[Qt-interest] QMutex deadlock without using QMutex

Brad Howes howes at ll.mit.edu
Tue Apr 27 16:54:13 CEST 2010


On Apr 27, 2010, at 10:31 AM, Andre Somers wrote:

> I am running into a weird problem.
> For running calculations on a large dataset, I split up the work over a 
> number of threads. I use signals and slots to communicate between the 
> worker threads and a coordinator thread, and also between that 
> coordinator thread and the rest of the application.

IOW, you are relying on Qt::QueuedConnection behavior for signal delivery to determine when all worker threads are done?

> I do not use any explicit thread synchronisation methods like QMutex in that part of the 
> application.

Does this mean that you use *implicit* thread sync somewhere, or that you do use QMutex elsewhere in your application?

> 
> Still, I get this error in my output:
> QMutex::lock: Deadlock detected in thread <some number>

Can you set a breakpoint in the source where that statement prints out?

Brad

-- 
Brad Howes
Group 42
MIT Lincoln Laboratory • 244 Wood St. • Lexington, MA 02173
Phone: 781.981.5292 • Fax: 781.981.3495 • Secretary: 781.981.7420









More information about the Qt-interest-old mailing list