| |
- Proxy
-
- MasterProxy
- SlaveProxy
- Queue
- __builtin__.object
-
- MasterObject
- Request
class Queue |
|
A queue of responses to some method call.
Queue.blocker is triggered when the response queue becomes non-empty,
so yield that before trying to read from the queue, if using the
tasks module.
For simple use (exactly one response), use:
data = Queue.dequeue_last()
For sequences, read the next result with:
data = Queue.dequeue()
Will return EndOfResponses on the last call. |
|
Methods defined here:
- __init__(self, master, serial)
- add(self, data)
- Add an item to the queue and trigger our current blocker.
- dequeue(self)
- Returns the first item in the queue for this serial number.
Queue.blocker may change to a new blocker (if the queue is now
empty) or None (if no more responses will arrive), so be sure
to reread it after this.
- dequeue_last(self)
- Calls dequeue, and also sets a flag to indicate that
the next item will be EndOfResponses, which will be handled
automatically.
|
class SlaveProxy(Proxy) |
|
Methods invoked on MasterProxy.root will be invoked on
slave_object with a callback function as the first argument.
This may be called any number of times to send replies. |
|
Methods defined here:
- __init__(self, to_master, from_master, slave_object)
- lost_connection(self)
| |