[Twisted-Python] Proposed change to producer/consumer interface

Itamar Shtull-Trauring lists at itamarst.org
Mon Sep 24 09:00:43 EDT 2001

When a producer unregisters itself using stopConsuming() (see 
internet/abstract.py) the consumer closes itself by calling 
loseConnection(). I contend this is silly, and that the consuming 
FileDescriptor should not close itself.

This is howeever a non-backwards compatible change, so anyone using 
producers will need to update their code (though e.g. the FTP code seems to 
explicitly close the consumer.)

So - should I make this change or add a new function "unregisterProducer()" 
the unregisters the producer without closing the connection?

More information about the Twisted-Python mailing list