| Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date | |
| All threads index page 1 | |
QT 4.3.0 Here is the issue... I have a signal that cross thread boundaries... It works fine as a normal queued connetion using Auto Connection... There are 3 objects in play. A parent object, which owns a child object, and a worker thread object. There are two identically signatured signals, one in the parent and one in the child, and 1 slot in the worker thread object. The signal is connected from the child to the parent objects signal using an Auto Connection. And then the parents signal is connected to the threads slot using a blocking queued connection. When the emit from the child is executed, a thread lock condition exists, since the connection system blocks at the first connection NOT the second.... Is this a known bug? Has it been fixed in a later version of 4.3.X? Scott
Scott Aron Bloom wrote: >QT 4.3.0 > > > >Here is the issue... I have a signal that cross thread boundaries... It >works fine as a normal queued connetion using Auto Connection... > > > >There are 3 objects in play. A parent object, which owns a child >object, and a worker thread object. > > > >There are two identically signatured signals, one in the parent and one >in the child, and 1 slot in the worker thread object. > > > >The signal is connected from the child to the parent objects signal >using an Auto Connection. > > > >And then the parents signal is connected to the threads slot using a >blocking queued connection. > > > > > > > >When the emit from the child is executed, a thread lock condition >exists, since the connection system blocks at the first connection NOT >the second.... > > > >Is this a known bug? Has it been fixed in a later version of 4.3.X? It doesn't sound like it's the desired behaviour, no. I don't know if it has been fixed, but looking at the logs for the relevant code sections I don't see anything relevant turning up. Maybe when Brad is back he can comment on it. In any case, can you send us a reminder via our task tracking system? If possible, include a small and reproducible testcase. -- [ signature omitted ]
Attachment:
signature.asc
Description: This is a digitally signed message part.
Scott Aron Bloom wrote: > QT 4.3.0 > > > > Here is the issue... I have a signal that cross thread boundaries... It > works fine as a normal queued connetion using Auto Connection... > > > > There are 3 objects in play. A parent object, which owns a child > object, and a worker thread object. > > > > There are two identically signatured signals, one in the parent and one > in the child, and 1 slot in the worker thread object. > > > > The signal is connected from the child to the parent objects signal > using an Auto Connection. > > > > And then the parents signal is connected to the threads slot using a > blocking queued connection. > > > > > > > > When the emit from the child is executed, a thread lock condition > exists, since the connection system blocks at the first connection NOT > the second.... > > > > Is this a known bug? Has it been fixed in a later version of 4.3.X? Do you have an example that reproduces the problem? I suspect you are getting this debug message as well: "Qt: Dead lock detected while activating a BlockingQueuedConnection." Remember that a QThread instance has affinity to the thread that created the QThread, *not* to itself (i.e. the slot is not going to be called from the running thread). -- [ signature omitted ]
Yes I am getting the message... and Ill work on creating a simple example... However, I have tried connecting it from different places, and I have tried setting the thread to the a different affinity. Is there any QT produced example that shows the proper usage of a blocking queued connection? Scott > -----Original Message----- > From: Bradley T Hughes [mailto:bhughes@xxxxxxxxxxxxx] > Sent: Sunday, January 06, 2008 10:55 PM > To: Scott Aron Bloom > Cc: qt-interest@xxxxxxxxxxxxx > Subject: Re: Possible bug in Blocking Queued Connections... > > Scott Aron Bloom wrote: > > QT 4.3.0 > > > > > > > > Here is the issue... I have a signal that cross thread boundaries... It > > works fine as a normal queued connetion using Auto Connection... > > > > > > > > There are 3 objects in play. A parent object, which owns a child > > object, and a worker thread object. > > > > > > > > There are two identically signatured signals, one in the parent and one > > in the child, and 1 slot in the worker thread object. > > > > > > > > The signal is connected from the child to the parent objects signal > > using an Auto Connection. > > > > > > > > And then the parents signal is connected to the threads slot using a > > blocking queued connection. > > > > > > > > > > > > > > > > When the emit from the child is executed, a thread lock condition > > exists, since the connection system blocks at the first connection NOT > > the second.... > > > > > > > > Is this a known bug? Has it been fixed in a later version of 4.3.X? > > Do you have an example that reproduces the problem? I suspect you are > getting > this debug message as well: "Qt: Dead lock detected while activating a > BlockingQueuedConnection." Remember that a QThread instance has affinity > to > the thread that created the QThread, *not* to itself (i.e. the slot is not > going to be called from the running thread). > > -- > Bradley T. Hughes - bhughes at trolltech.com > Trolltech ASA - Sandakervn. 116, P.O. Box 4332 Nydalen, 0402 Oslo, Norway -- [ signature omitted ]