ThreadWithProgressWindow and MessageManagerLock


#1

I am trying to make status window thread, basing on ThreadWithProgressWindow class, to display currently loading file name, while a project, consisting of multiple files, is being loaded. To be able to call Juce components’ methods I use MessageManagerLock inside this thread, but everything just hangs when this thread starts to work! Is it some kind of deadlock, caused by conflict of MessageManagerLock and ScopedLock, used in ThreadWithProgressWindow? If so, how it’s possible to call Juce components from such a thread? Thanks.


#2

Whenever you use two threads and two locks, the opportunities for deadlocking are there…

There’s no magic answer to your question except to say “stop it in the debugger and see where it is”. Deadlocks are at least pretty obvious when you catch them.


#3