tubes._siphon._Siphon(object)
class documentationtubes._siphon
(View In Hierarchy)
Method | __init__ | Initialize this _Siphon with the given
ITube to control its
behavior. |
Method | __repr__ | Nice string representation. |
Method | ejectPending | Eject the entire pending buffer into a list for reassembly by a diverter. |
Instance Variable | _tube | the ITube which will
receive values from this siphon and call deliver to deliver
output to it. (When set, this will automatically set the
siphon attribute of said ITube as well, as well as
un-setting the siphon attribute of the old tube.) |
Instance Variable | _currentlyPaused | is this _Siphon
currently paused? Boolean: True if paused, False
if not. |
Instance Variable | _pauseBecausePauseCalled | an IPause from the
upstream fount, present because pauseFlow has been called. |
Instance Variable | _flowStoppingReason | If this is not None , then call flowStopped on the
downstream IDrain at the
next opportunity, where "the next opportunity" is when all
buffered input (values yielded from started ,
received , and stopped ) has been written to the
downstream drain and we are unpaused. |
Instance Variable | _everStarted | Has this _Siphon ever
called started on its ITube ? (type: bool ) |
Method | _noMore | I am now unable to produce further input, or output, or both. |
Method | _deliverFrom | Deliver some items from a callable that will produce an iterator. |
Method | _unbufferIterator | Un-buffer some items buffered in self._pending and actually
deliver them, as long as we're not paused. |
Method | _endOfLine | We've reached the end of the line. Immediately stop delivering all buffers and notify our downstream drain why the flow has stopped. |
IPause
from the
upstream fount, present because pauseFlow has been called.
None
, then call flowStopped
on the
downstream IDrain
at the
next opportunity, where "the next opportunity" is when all
buffered input (values yielded from started
,
received
, and stopped
) has been written to the
downstream drain and we are unpaused.
Deliver some items from a callable that will produce an iterator.
Parameters | deliverySource | a 0-argument callable that will return an iterable. |
Un-buffer some items buffered in self._pending
and actually
deliver them, as long as we're not paused.
We've reached the end of the line. Immediately stop delivering all buffers and notify our downstream drain why the flow has stopped.
Parameters | flowStoppingReason | the reason that the flow was stopped. |
Eject the entire pending buffer into a list for reassembly by a diverter.
Returns | a list
of all buffered output values. |