Class: cogen.core.reactors.KQueueReactor
Constructor
__init__ (self, scheduler, res, default_size=1024)
Methods
__init__ (self, scheduler, res, default_size=1024)
__len__ (self)
add (self, op, coro)
~ @debug(0)
handle_errored (self, desc, code=None)
Handles descriptors that have errors.
remove (self, op, coro)
~ @debug(0)
run (self, timeout=0)
Run a reactor loop and return new socket events. Timeout is a timedelta object, 0 if active coros or None.
kqueue timeout param is a integer number of nanoseconds (seconds/10**9).
run_once (self, fdesc, waiting_ops)
Run a operation, remove it from the reactor and return the result. Called from the main reactor loop.
run_operation (self, op, reactor=True)
Run the socket op and return result or exception.
run_or_add (self, op, coro)
Perform operation and return result or add the operation in the reactor if socket isn't ready and return none. Called from the scheduller via SocketOperation.process.
waiting_op (self, testcoro)
Returns the registered operation for some specified coroutine.