[Qt-interest] QThreadPool deadlock after crash

Anthony Serdyukov uksus70 at gmail.com
Mon Jan 26 04:35:18 CET 2009


Good day, colleagues!

Recently I have met with such a problem.
My application uses QTreadPool for performing some calculations.
This calculation involves third-party library, which crashes (access
violation) in some circumstances.
So, the application crashes. But! The application hangs within process
list after crash.

Digging and debugging, I have found the cause. It's because the
QThreadPool::globalInstance() waits for all its treads to finish.
Of course, the crashed thread will never finish normally.

I have noticed, that instances other than global one don't wait its
threads on application termination.
This is the solution for me, but I'd like to know whether this is a
bug in QThreadPool?

-- 
Regards,
Anthony



More information about the Qt-interest-old mailing list