[Twisted-Python] stop receiving from socket until processing finish
Rodrigo Strauss
rodrigo at 1bit.com.br
Wed Aug 8 08:06:24 MDT 2007
Hi!
Consider the following scenario (each component is a twisted app):
producer --> processor --> destination
I need to stop receiving producer data until I'm able to process it
and send to destination. Using sync sockets, the producer send() with
block if processor isn't recv'ing as fast as it can send. How can I do
this using twisted? Something like telling reactor to stop receiving
from a specific socket until I enable it back. When I send something
to destination, the reactor will come back to scene and recv data from
producer.
A simple solution is to make processor ask for data to process every
time, but when processor is fast enough it will hurt the performance
to much.
Rodrigo
More information about the Twisted-Python
mailing list