[PyQt] QImage and the GIL

Phil Thompson phil at riverbankcomputing.com
Mon Mar 16 17:18:51 GMT 2015


On 12/03/2015 5:24 pm, Martin Altmayer wrote:
> Hello,
> 
> I use a separate thread to open and scale a large set of images.
> Unfortunately, with PyQt5 the main thread blocks while an image is
> loaded (it did work in PyQt4). I believe that the reason is that the
> QImage-constructor and QImage.scale do not release the GIL. Wouldn't
> it be better if they did?

The GIL is now released for all calls that go to the filesystem or a 
QIODevice (ie. those that might block).

Phil


More information about the PyQt mailing list