Jérôme Belleman
Home  •  Tools  •  Posts  •  Talks  •  Travels  •  Graphics  •  About Me

Thread Safety with PySide

13 Oct 2013

PySide is a nice Python wrapper for Qt which hides some internal aspects of it. For instance, thread safety: what's safe when it comes to signals and slots?

1 Signals and Slots in Plain C++ Qt

Are they safe? The Qt documentation on Signals and Slots Across Threads suggests the right connection will be automatically picked – that'll be a queued connection in the case of multithreading to keep it all safe. They offer the Mandelbrot Example in C++, which we have for Python too:

2 Signals and Slots in PySide

The PySide Mandelbrot Example uses the traditional signals and slots syntax. Using the new syntax would have:

3 References