SharedMessageThread mess up my threading model for Linux VST Plugins


#1

Hi everybody,

I noticed that Linux VST plugins use another thread called SharedMessageThread for their message loop, which is different to the normal message loop.

What’s the reason for this? It keeps up messing the calls to MessageManager::isThisTheMessageThread, because it changes the message thread ID which I am constantly using in my codebase to figure out if the function needs to be dispatched or not.

Also there is no MessageManagerLock in this thread which removes the purpose of the MessageManagerLock class for Linux VST plugins.

If I add the MessageManagerLock before setting the message thread ID and the execution of the dispatch loop in the SharedMessageThread::run() method, it will work, but my gut feeling tells me that if this was the solution, you would have already added it.