Standalone applications and multicore CPUs


#1

I'm developing a standalone application (not a plugin) which is able to load multiple plugin instances. It's very important for the project that each plugin (or a group of them) run in its own kernel level thread, taking advantage of the multicore CPUs.

I didn't find any example or documentation about how to do it. Can I do it with Juce? (maybe in a future?) If I can, where can I see any example or documentation? Maybe with third party libraries? Any tip will be welcome!


#2

In C++, all threads are "kernel level" threads. Obviously juce has a ton of threading classes, you won't need anything else. 

But.. having recently implemented parallel plugin rendering in Tracktion, I should warn you that getting a pool of threads to render and combine their output with a low enough latency for realtime playback will require ninja-level mastery of non-blocking thread techniques. So good luck with your learning experience!


#3

Thank you. Then Juce's Thread classes with proper non-blocking techniques are enough for using the multiple CPU's core, right? Could external libraries like Intel TBB ease the work (if you know about them)?

 


#4

Yeah, you don't actually need any fancy features to do this, just atomics and basic threads.