[PyQt] QtSql and releasing GIL
Arve Knudsen
arve.knudsen at gmail.com
Tue Apr 22 11:58:58 BST 2014
I patched PyQt, but it doesn't build for me at the moment due to something
to do with OpenGL (maybe I need to reinstall Qt). It doesn't really matter
though, since I discovered I can query via QSqlQuery.exec_ instead, which
does release the GIL! When using this method, I can confirm that the app no
longer hangs.
Best,
Arve
On Tue, Apr 22, 2014 at 12:43 PM, Arve Knudsen <arve.knudsen at gmail.com>wrote:
> On Tue, Apr 22, 2014 at 12:38 PM, Phil Thompson <
> phil at riverbankcomputing.com> wrote:
>
>> On 22/04/2014 11:32 am, Arve Knudsen wrote:
>>
>>> On Tue, Apr 22, 2014 at 12:29 PM, Phil Thompson
>>> <phil at riverbankcomputing.com> wrote:
>>>
>>> On 22/04/2014 11:22 am, Arve Knudsen wrote:
>>>>
>>>> I am experiencing this issue again.it [1] [1]'s QtSql.QSqlQuery
>>>>>
>>>>> that
>>>>>
>>>>> locks up the application, even though it runs in a non-UI thread.
>>>>> I've
>>>>> confirmed that the main thread has relinquished control back to
>>>>> the Qt
>>>>> event loop.
>>>>>
>>>>> It's a total showstopper at the moment, so I'm considering
>>>>> querying in
>>>>> a separate process instead.
>>>>>
>>>>> Arve
>>>>>
>>>>
>>>> Sorry I've just realised that my comment below is completely wrong.
>>>> The GIL is released for next() but nor for value() or any ctor. Can
>>>> you confirm exactly which function it is locking up in?
>>>>
>>>
>>> I mean the QtSql.QSqlQuery ctor.
>>>
>>
>> Which one?
>>
>
> The one accepting a QString.
>
>
>> Try adding /ReleaseGIL/ to it and rebuild.
>
>
> I'm on it :)
>
> Arve
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140422/ed6e188c/attachment.html>
More information about the PyQt
mailing list