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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Baptiste de la gorce
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? 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.

Baptiste.
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
Reply | Threaded
Open this post in threaded view
|

Re: Why with PyQt5, The GIL is only released when it is known to be needed ?

Phil Thompson-5
On 17 Jan 2019, at 11:11 am, Baptiste de la gorce <[hidden email]> 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
_______________________________________________
PyQt mailing list    [hidden email]
https://www.riverbankcomputing.com/mailman/listinfo/pyqt