Stream data to me in one end and I will iterate it out the other.

Acts like a file handle for writing in one thread (even the main one under the Twisted event loop) and an iterator in another thread. Hook me up to an iteration.Deferator to stream data over a worker interface.

You must call my close method to stop me from iterating.

Method __init__ Filerator(maxThreads=None)
Method closed Undocumented
Method loop Runs a loop in a dedicated thread that waits for new iterations to be written. When I get an instance of IterationGetter.IterationStopper, the loop exits.
Method write This is called with a chunk of data. It goes through two stages to emerge from my blocking end as an iteration, via next.
Method writelines Adds a list full of data chunks to my buffer.
Method flush Doesn't do anything, because I am always trying to flush my buffer by iterating its contents.
Method close Closing me as a "file" tells me that I can stop iterating once the buffer is flushed.

Inherited from IterationGetter:

Class IterationStopper Undocumented
Method start Call this when I should start listening for iterations.
Method deferUntilDone Returns a Deferred that fires when I am done iterating.
Method __iter__ Undocumented
Method next Undocumented

Inherited from PoolUser (via IterationGetter):

Class Method setup Sets up stuff class-wide, with all the potential pitfalls that entails.
Class Method shutdown Shuts down all threads, returning a Deferred that fires when everything's done, class-wide.
Class Method deferToThreadInPool Runs the f-args-kw call combo in one of my threads, returning a Deferred that fires with the eventual result. Can be run from the class or any instance of me with the exact same result.
Method pool Returns a reference to the class-wide threadpool, starting it if this is the first time it's been used.
def __init__(self, maxThreads=None):

Filerator(maxThreads=None)

@property
def closed(self):
Undocumented
def loop(self):

Runs a loop in a dedicated thread that waits for new iterations to be written. When I get an instance of IterationGetter.IterationStopper, the loop exits.

def write(self, data):

This is called with a chunk of data. It goes through two stages to emerge from my blocking end as an iteration, via next.

def writelines(self, lines):

Adds a list full of data chunks to my buffer.

def flush(self):

Doesn't do anything, because I am always trying to flush my buffer by iterating its contents.

def close(self):

Closing me as a "file" tells me that I can stop iterating once the buffer is flushed.