Juce threads running in MFC Loop?

Hi everyone,

This is my first time posting here. Forgive my ignorance and hopefully my question has a quick fix.

I’m currently integrating two projects, one which creates a GUI by MFC (sorry didn’t know about JUCE till after the fact), and the other which runs some JUCE threads. To startup the JUCE threads, I call a JUCE-thread-startup class from the constructor of my MFC main dialogue display (Note: I am making sure to call initializeJUCE_GUI( ) first, since MFC uses its own event loop).

I can’t figure out the cause, but the thread manager seems to get stuck and MessageManager.deliverMessage( ) is not called like I expect. This doesn’t happen always, maybe once every ten tries.

Is there any known incompatibility between the MFC event loop and JUCE thread management?

Thanks in advance,

To clarify, “not called like I expect” means not being called at all.

It runs quite happily in apps where something else is performing the event loop, so can’t think of an obvious reason why it’d fail. When you say it’s getting stuck, where exactly is the deadlock?

Hi Jules,

Sorry for the late reply as I’ve been away for a month. I figured out the source of the problem and it was unrelated to MFC, but just an external class that was using the juce thread class incorrectly it seems. Thanks for your reply anyhow.