~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-timer.pyx
diff --git
a/sel-timer.pyx
b/sel-timer.pyx
index
261ecde
..
db61a6c
100644
(file)
--- a/
sel-timer.pyx
+++ b/
sel-timer.pyx
@@
-72,10
+72,14
@@
cdef class SelTimer:
def timer(me, now):
return _maybecall(me._timer, ())
def timer(me, now):
return _maybecall(me._timer, ())
-cdef void _timerfunc(timeval *now, void *arg):
+cdef void _timerfunc
2
(timeval *now, void *arg):
cdef SelTimer st
st = <SelTimer>arg
st._dead()
st.timer(_tvtofloat(now))
cdef SelTimer st
st = <SelTimer>arg
st._dead()
st.timer(_tvtofloat(now))
+cdef void _timerfunc(timeval *now, void *arg):
+ PyEval_AcquireLock()
+ _timerfunc2(now, arg)
+ PyEval_ReleaseLock()
#----- That's all, folks ----------------------------------------------------
#----- That's all, folks ----------------------------------------------------