Thread priority question

4 posts / 0 new
Last post
Alatar
Offline
Last seen: 3 months 1 day ago
Joined: 29 Jan 2012 - 09:44
Thread priority question

Hello,

I was wondering if it is safe to assume, that the audio thread in my plugin allways has the highest priority? ( I am refering to the one created by subclassing "AudioProcessor")
What priority does it actually have?

In my case, I am updating the GUI with a timer thread (JUCE::Timer). Can I be sure, that the audio thread allways has precedence and I do not have to fear dropouts?

TheVinn
Offline
Last seen: 3 days 6 hours ago
Joined: 29 Aug 2009 - 11:31
Re: Thread priority question

Its a fairly safe assumption. Most audio threads are high-priority threads provided by the operating system. You should not need to mess with priorities or worry about them.

Alatar
Offline
Last seen: 3 months 1 day ago
Joined: 29 Jan 2012 - 09:44
Re: Thread priority question

Thanks Vinn,

Thats reassuring. Good to know I do not need to worry. :-)

TheVinn
Offline
Last seen: 3 days 6 hours ago
Joined: 29 Aug 2009 - 11:31
Re: Thread priority question

Alatar wrote:
Good to know I do not need to worry. :-)

You still need to make sure you don't call from anything inside your processReplacing() that can block (like malloc, free, new, delete, operating system calls, etc).