Make pycapnp GIL friendly

Now calling `wait` from one thread will not block all threads
This commit is contained in:
Jason Paryani
2014-07-09 00:49:35 -07:00
parent 5befda532f
commit a1f7d32853
8 changed files with 171 additions and 26 deletions

View File

@@ -51,7 +51,7 @@ cdef extern from "kj/memory.h" namespace " ::kj":
Own[PyRefCounter] makePyRefCounter" ::kj::heap< PyRefCounter >"(PyObject *)
cdef extern from "kj/async.h" namespace " ::kj":
cdef cppclass Promise[T]:
cdef cppclass Promise[T] nogil:
Promise()
Promise(Promise)
Promise(T)

View File

@@ -1,5 +1,4 @@
from cpython.ref cimport PyObject, Py_INCREF, Py_DECREF
from cpython.exc cimport PyErr_Clear
from libc.stdint cimport *
ctypedef unsigned int uint
ctypedef uint8_t byte