Hello,
I have some questions concerning your threading model described in your Integration Guide on page 20 and 21. Can those 4 or more threads run simultaneously, i.e. in a multithreading application on a multi-core processor? Or do they have to follow the described schedule as shown in the figure below (which has been extracted from the Integration Guide)?
![Processor activity Processor activity](https://dspconcepts.com/sites/default/files/activity.png)
If the threads cannot run simultaneously, can they be interrupted and continued at any time, e.g. as it might be in multithreading single-core applications the case? According to the figure, at least the audio processing thread can be interrupted.
Regards,
Markus
9:57am
In short, Yes. It's intended for multi-threaded environments.
That image shows all the threads simultaneously active, with each thread having a different priority. The "Audio I/O" thread is the highest priority. After the first Audio interrupt in this image, both processing treads were activated. The 32-sample block [green] thread runs first because it's higher priority. When it completes, the 64-sample thread [blue] begins to run - but the processing in this thread takes a while to execute, so it doesn't complete before it's interrupted again.
After the second Audio interrupt, the 32-sample processing runs. When that completes, priority returns to the in-process 64-sample thread, which then completes, and execution falls to the background thread. This cycle repeats every 2nd interrupt.
10:29am
Thanks for your answer. So as I understand it, the AWE core library is or should be thread-safe. Only the priorities have to be kept in mind.