[PyQt] Why with PyQt5, The GIL is only released when it is known to be needed ?

Phil Thompson phil at riverbankcomputing.com
Thu Jan 17 14:56:19 GMT 2019


On 17 Jan 2019, at 11:11 am, Baptiste de la gorce <guilbut.pyqt2 at gmail.com> wrote:
> 
> Hello,
> I can read on the PyQt5 documentation that "The GIL is only released when it is known to be needed. PyQt4 always released the GIL when calling Qt." Why this choice to release the GIL less often withPyQt5 than with PyQt4?

To avoid the overhead of acquiring/releasing the GIL when it is not necessary.

> I'm developing a software with several threads (one for GUI, one with high CPU usage, others for IO). I'm using PyQt4 and wish to switch to PyQt5, but am afraid to have something less responsive.

Shouldn't make any difference.

Phil


More information about the PyQt mailing list