Public Member Functions | |
def | __init__ |
def | get |
def | listen |
def | set_discard |
def | stop_listen |
Public Attributes | |
discard | |
put | |
Private Member Functions | |
def | _put |
def | _trigger |
Private Attributes | |
_invoke_listener | |
_queue |
Event stream class to be used with select and switch.
Definition at line 51 of file async_helpers.py.
def multi_interface_roam.async_helpers.EventStream.__init__ | ( | self, | |
event = None |
|||
) |
Reimplemented in multi_interface_roam.async_helpers.Timeout, and multi_interface_roam.async_helpers.EventStreamFromDeferred.
Definition at line 53 of file async_helpers.py.
def multi_interface_roam.async_helpers.EventStream._put | ( | args, | |
kwargs | |||
) | [private] |
Puts an element into the queue, and notifies an eventual listener. Use pop rather than _pop or you will create cycles and prevent reference counts from going to zero.
Definition at line 61 of file async_helpers.py.
def multi_interface_roam.async_helpers.EventStream._trigger | ( | self | ) | [private] |
Used internally to to trigger the callback.
Definition at line 76 of file async_helpers.py.
Pops the next element off the queue.
Definition at line 72 of file async_helpers.py.
Returns a Deferred that will be called the next time an event arrives, possibly immediately.
Definition at line 81 of file async_helpers.py.
def multi_interface_roam.async_helpers.EventStream.set_discard | ( | self, | |
discard | |||
) |
Tells the event stream whether it should discard all queued and incoming events.
Definition at line 96 of file async_helpers.py.
Discards the Deferred set by listen.
Definition at line 91 of file async_helpers.py.
Definition at line 53 of file async_helpers.py.
Definition at line 53 of file async_helpers.py.
Definition at line 53 of file async_helpers.py.
Definition at line 53 of file async_helpers.py.