Commit ce8cb3db authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4e111c94
......@@ -31,8 +31,8 @@ from posix.types cimport off_t
from cpython.exc cimport PyErr_SetFromErrno
from golang cimport pychan, select, panic, topyexc
from golang import time
from golang cimport chan, pychan, select, panic, topyexc
from golang cimport time
# _tDB is pyx part of tDB.
cdef class _tDB:
......@@ -52,7 +52,7 @@ cdef class _tDB:
# but, if _abort_ontimeout uses GIL, won't continue to run trying to lock
# GIL -> deadlock.
def _abort_ontimeout(_tDB t, double dt, pychan nogilready not None):
cdef pychan timeoutch = time.after(dt)
cdef chan[double] timeoutch = time.after(dt)
cdef int fdabort = t._wcfuseabort.fileno()
emsg1 = "\nC: test timed out after %.1fs\n" % (dt / time.second)
cdef char *_emsg1 = emsg1
......@@ -61,10 +61,10 @@ cdef class _tDB:
nogilready.chan_structZ().close()
t.__abort_ontimeout(dt, timeoutch, fdabort, _emsg1)
cdef void __abort_ontimeout(_tDB t, double dt, pychan timeoutch,
cdef void __abort_ontimeout(_tDB t, double dt, chan[double] timeoutch,
int fdabort, const char *emsg1) nogil except +topyexc:
_ = select([
timeoutch.chan_double().recvs(), # 0
timeoutch.recvs(), # 0
t._closed.chan_structZ().recvs(), # 1
])
if _ == 1:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment