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]
/
ident.pyx
diff --git
a/ident.pyx
b/ident.pyx
index d19c3a4599c8a8ae3423294089b736a8628aea65..e7c05d29dd92ad2f074afbe1137380c19eb50750 100644
(file)
--- a/
ident.pyx
+++ b/
ident.pyx
@@
-157,7
+157,7
@@
cdef class SelIdentify:
def bogus(me):
return _maybecall(me._bogus, ())
def bogus(me):
return _maybecall(me._bogus, ())
-cdef void _identfunc(ident_reply *i, void *arg):
+cdef void _identfunc
2
(ident_reply *i, void *arg):
cdef SelIdentify id
id = <SelIdentify>arg
id._dead()
cdef SelIdentify id
id = <SelIdentify>arg
id._dead()
@@
-167,5
+167,9
@@
cdef void _identfunc(ident_reply *i, void *arg):
id.error(i.u.error)
elif i.type == IDENT_USERID:
id.user(i.u.userid.os, i.u.userid.user)
id.error(i.u.error)
elif i.type == IDENT_USERID:
id.user(i.u.userid.os, i.u.userid.user)
+cdef void _identfunc(ident_reply *i, void *arg):
+ PyEval_AcquireLock()
+ _identfunc2(i, arg)
+ PyEval_ReleaseLock()
#----- That's all, folks ----------------------------------------------------
#----- That's all, folks ----------------------------------------------------