[PyQt] QImage and the GIL
Martin Altmayer
martin.altmayer at web.de
Thu Mar 12 19:58:33 GMT 2015
As far as I understand the docs at
http://pyqt.sourceforge.net/Docs/PyQt5/pyqt4_differences.html#releasing-the-gil
the GIL needs to be released before I call a Qt function from Python.
And as far as I understand qimage.sip the GIL is not released for QImage
methods.
Am 12.03.2015 20:52 schrieb Jason H:
> The GIL is not in effect when you are in C++ code. If you are in
> QImage::scale, then you aren't experiencing GIL.
>
>
>> Sent: Thursday, March 12, 2015 at 1:24 PM
>> From: "Martin Altmayer" <martin.altmayer at web.de>
>> To: pyqt at riverbankcomputing.com
>> Subject: [PyQt] QImage and the GIL
>>
>> 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?
>>
>> Thanks,
>> Martin
>> _______________________________________________
>> PyQt mailing list PyQt at riverbankcomputing.com
>> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
More information about the PyQt
mailing list