X-Git-Url: https://git.distorted.org.uk/~mdw/mLib-python/blobdiff_plain/579d01693c86259110fe7a2c2a6f005f1bdbad5b..b3c87d862e8f44754113ee9bf374e9fcfbc9e7ac:/sel-timer.pyx diff --git a/sel-timer.pyx b/sel-timer.pyx index 261ecde..db61a6c 100644 --- a/sel-timer.pyx +++ b/sel-timer.pyx @@ -72,10 +72,14 @@ cdef class SelTimer: def timer(me, now): return _maybecall(me._timer, ()) -cdef void _timerfunc(timeval *now, void *arg): +cdef void _timerfunc2(timeval *now, void *arg): cdef SelTimer st st = 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 ----------------------------------------------------