Package twisted :: Package flow :: Module controller :: Class Block |
[frames | no frames]

## 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

Method Details

### next(self) fetch the next value from the Stage flow Overrides: `twisted.flow.base.Stage.next`

Generated by Epydoc 2.0 on Sat Oct 25 00:55:12 2003 | http://epydoc.sf.net