On 6/13/08, Phil Thompson <[EMAIL PROTECTED]> wrote:
> On Friday 13 June 2008 10:54:47 am Arve Knudsen wrote:
>  > Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS in the API:
>  > PyGILState_Ensure/PyGILState_Release. Could SIP make use of these
>  > functions instead?
>
>
> They are not alternatives. One pair frees the GIL for a period, the other
>  acquires the GIL for a period.

In order to free the GIL, you have to acquire it first no? Therefore,
BEGIN_ALLOW/END_ALLOW, should correspond to GILState_Release of a
previously Ensure'd GIL state and then a new call to
PyGILState_Ensure. Besides, the Python docs
(http://docs.python.org/api/threads.html) present the PyGILState_*
functions as a simpler alternative to Py_BEGIN_ALLOW_THREADS et al.

Arve
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to