Problem in killing all threads on exit


I have developed a multi-threaded application using JUCE. My problem is if i try to forcefully exit the application, some of the threads still remain active. I tried using the static method Thread::stopAllThreads during exit, but it does not work :frowning:

Can somebody suggest a workaround?

The only correct way to do this is to make sure all your threads will stop cleanly when asked to, using threadShouldExit().

You can kill them by force, but it’s not a good idea. stopAllThreads will forcibly zap them if you pass in a time-out of zero.