Public Member Functions | |
def | close |
def | consume |
def | fileno |
def | wake |
A socket-like object that can wake another thread from ``select()``. The `~tornado.ioloop.IOLoop` will add the Waker's `fileno()` to its ``select`` (or ``epoll`` or ``kqueue``) calls. When another thread wants to wake up the loop, it calls `wake`. Once it has woken up, it will call `consume` to do any necessary per-wake cleanup. When the ``IOLoop`` is closed, it closes its waker too.
Definition at line 32 of file interface.py.
def tornado.platform.interface.Waker.close | ( | self | ) |
Closes the waker's file descriptor(s).
Reimplemented in tornado.platform.common.Waker, and tornado.platform.posix.Waker.
Definition at line 57 of file interface.py.
def tornado.platform.interface.Waker.consume | ( | self | ) |
Called after the listen has woken up to do any necessary cleanup.
Reimplemented in tornado.platform.common.Waker, and tornado.platform.posix.Waker.
Definition at line 53 of file interface.py.
def tornado.platform.interface.Waker.fileno | ( | self | ) |
Returns a file descriptor for this waker. Must be suitable for use with ``select()`` or equivalent on the local platform.
Reimplemented in tornado.platform.common.Waker, and tornado.platform.posix.Waker.
Definition at line 41 of file interface.py.
def tornado.platform.interface.Waker.wake | ( | self | ) |
Triggers activity on the waker's file descriptor.
Reimplemented in tornado.platform.common.Waker, and tornado.platform.posix.Waker.
Definition at line 49 of file interface.py.