Commit 9847b8bf authored by Denis Bilenko's avatar Denis Bilenko

core.async: add send() method and 'sent' property

parent 24b559f8
......@@ -747,6 +747,13 @@ cdef public class async(watcher) [object PyGeventAsyncObject, type PyGeventAsync
INIT(async,,)
def send(self):
libev.ev_async_send(self.loop._ptr, &self._watcher)
@property
def sent(self):
return libev.ev_async_pending(&self._watcher)
#cdef public class child(watcher) [object PyGeventChildObject, type PyGeventChild_Type]:
#
......
......@@ -131,6 +131,8 @@ cdef extern from "libev.h":
void ev_async_init(ev_async*, void* callback)
void ev_async_start(ev_loop*, ev_async*)
void ev_async_stop(ev_loop*, ev_async*)
void ev_async_send(ev_loop*, ev_async*)
int ev_async_pending(ev_async*)
void ev_child_init(ev_child*, void* callback, int, int)
void ev_child_start(ev_loop*, ev_child*)
......
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