Class Block
Controller
--+
|
Instruction
--+ |
| |
Stage
--+
|
Block
A controller which blocks on Cooperate events
This converts a Stage into an iterable which can be used directly in
python for loops and other iteratable constructs. It does this by eating
any Cooperate values and sleeping. This is largely helpful for testing or
within a threaded environment. It converts other stages into one which
does not emit cooperate events.
[1,2, Cooperate(), 3] => [1,2,3]
Method Summary |
|
__init__(self,
stage,
*trap)
|
|
next (self)
fetch the next value from the Stage flow |
Inherited from Stage |
|
__iter__ (self)
|
|
_yield (self)
executed during a yield statement by previous stage |