Async serial communication/threads sharing data

Hendrik van Rooyen mail at microcorp.co.za
Mon Mar 23 03:33:50 EDT 2009


"Nick Craig-Wood" <ni...g-wood.com> wrote:

> 
> I wrote a serial port to TCP proxy (with logging) with twisted.  The
> problem I had was that twisted serial ports didn't seem to have any
> back pressure.  By that I mean I could pump data into a 9600 baud
> serial port at 10 Mbit/s.  Twisted would then buffer the data for me
> using 10s or 100s or Megabytes of RAM.  No data would be lost, but
> there would be hours of latency and my program would use up all my RAM
> and explode.
> 
> What I wanted to happen was for twisted to stop taking the data when
> the serial port buffer was full and to only take the data at 9600
> baud.
> 
> I never did solve that problem :-(
> 

Not sure if this is Twisted's fault - 
do python sockets have 
automatic back pressure?
Do Linux sockets have back pressure?

- Hendrik




More information about the Python-list mailing list