chiark
/
gitweb
/
~mdw
/
mLib-python
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Acquire and release the GIL around select callbacks.
[mLib-python]
/
sel-base.pyx
diff --git
a/sel-base.pyx
b/sel-base.pyx
index e7b4fbe7329a9a6a51132cc95772834de8fb3f3b..6a5e2c39b39c38272240a2944117486ac9cb9eab 100644
(file)
--- a/
sel-base.pyx
+++ b/
sel-base.pyx
@@
-28,7
+28,11
@@
cdef sel_state _sel
def select():
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)
_oserror()
sel_init(&_sel)