[PyQt] test case for deadlock in signal / slot new style

Phil Thompson phil at riverbankcomputing.com
Thu Oct 7 11:09:50 BST 2010


On Mon, 4 Oct 2010 22:27:59 +0200, Erik Janssens
<Erik.Janssens at conceptive.be> wrote:
> Hi,
> 
> I finally got around writting a simple test case to demonstrate
> the deadlock in the signal/slot new style connections.
> 
> The test case can be ran using the following command :
> 
> python -m nose.core -v -s test_deadlock.py:SignalSlotCase
> 
> depending on the speed of your computer, it might take some
> tweaking to observe the deadlock, it occurs when 'emitted' and
> 'connected' are printed on the screen at the same time.
> 
> Here are some interesting observations :
> 
> - the deadlock happens independent of the QT / PyQT version
> - the old_style never deadlocks
> - this example won't work at all using PySide, it seems that PySide
>   doesn't support queued connections involving python objects.
> 
> I'm not sure what I have to do with this issue, is this a Qt, Python
> or PyQt issue ??

Life is so much easier with a good test case...

Should be fixed in tonight's PyQt snapshot.

Thanks,
Phil


More information about the PyQt mailing list