AudioProcessor::processBlock() and Thread::notify() - is it lock-free?


Simple question, can be used Thread::notify() (to trigger an external thread) inside the AudioProcessor::processBlock()? Or does it perform any lock and it should be forbidden?


Sure, you’re almost certainly safe to call that.


Thank you, really appreciated


I’m on macOS - Thread::notify() calls WaitableEvent::signal(), and on a Posix system, this function calls pthread_mutex_lock (&mutex).

Unless macOS supports priority inheritance from realtime threads to normal Posix threads (does it? I don’t know…), I’d rather avoid calling Thread::notify() on a realtime thread/audio callback.