X-Git-Url: https://git.distorted.org.uk/~mdw/mLib-python/blobdiff_plain/579d01693c86259110fe7a2c2a6f005f1bdbad5b..b3c87d862e8f44754113ee9bf374e9fcfbc9e7ac:/sel-base.pyx diff --git a/sel-base.pyx b/sel-base.pyx index e7b4fbe..6a5e2c3 100644 --- a/sel-base.pyx +++ b/sel-base.pyx @@ -28,7 +28,11 @@ cdef sel_state _sel def select(): - if sel_select(&_sel) and errno != EINTR and errno != EAGAIN: + cdef int rc + PyEval_ReleaseLock() + rc = sel_select(&_sel) + PyEval_AcquireLock() + if rc and errno != EINTR and errno != EAGAIN: _oserror() sel_init(&_sel)