Class: IProducer | Twisted-0.19.0/twisted/internet/interfaces.py | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A producer produces data for a consumer.If this is a streaming producer, it will only be asked to resume producing if it has been previously asked to pause. Also, if this is a streaming producer, it will ask the producer to pause when the buffer has reached a certain size. In other words, a streaming producer is expected to produce (write to this consumer) data in the main IO thread of some process as the result of a read operation, whereas a non-streaming producer is expected to produce data each time resumeProducing() is called. If this is a non-streaming producer, resumeProducing will be called immediately, to start the flow of data. Otherwise it is assumed that the producer starts out life unpaused.
|