Fix bug in removing an EventLoop

This commit is contained in:
Jason Paryani
2013-12-02 17:54:53 -08:00
parent 888b906781
commit cfc11e4a8a
3 changed files with 9 additions and 9 deletions

View File

@@ -1173,10 +1173,11 @@ cdef class _EventLoop:
self.thisptr = new UnixEventLoop()
def __dealloc__(self):
del self.thisptr
self.remove()
def delete(self):
cpdef remove(self) except +reraise_kj_exception:
del self.thisptr
self.thisptr = NULL
# cpdef evalLater(self, func):
# Py_INCREF(func)
@@ -1215,7 +1216,7 @@ DEFAULT_EVENT_LOOP = _EventLoop()
def remove_event_loop():
global DEFAULT_EVENT_LOOP
DEFAULT_EVENT_LOOP.delete()
DEFAULT_EVENT_LOOP.remove()
DEFAULT_EVENT_LOOP = None
cdef class _CallContext: