[Twisted-Python] The stopConsuming method

Matt Campbell mattcampbell at pobox.com
Thu Aug 1 13:19:31 EDT 2002


I noticed a method in twisted.internet.abstract.FileDescriptor
called stopConsuming, which can be called by the producer to indicate
that there is nothing more to produce.  The method calls
self.unregisterProducer, then self.loseConnection.  I also noticed
that this method isn't part of the IConsumer interface and isn't
implemented by twisted.protocols.http.Request.  I think this method
should be added to IConsumer and implemented by all classes that
implement that interface, because it enables the producer to indicate
that there's nothing more to produce, whether the consumer be a
Transport on which loseConnection is called to terminate the
connection, or a Request on which finish is called to end that
request/response process.
-- 
Matt Campbell
Email and MSN Messenger:  mattcampbell at pobox.com
Phone:  (316) 652-8727
Web site:  http://www.pobox.com/~mattcampbell/




More information about the Twisted-Python mailing list