[Twisted-Python] how to stop dataReceived while waiting a deferred to fire?

Andrea Arcangeli andrea at cpushare.com
Tue Feb 22 12:12:30 EST 2005

On Tue, Feb 22, 2005 at 03:35:40PM +1100, Andrew Bennetts wrote:
> I've filed http://twistedmatrix.com/bugs/issue899 so this issue doesn't get
> forgotten.

Thanks a lot!

What the pauseProducing does is fine for my objective of stopping the
client and to restart it from both errback/callback, but what it does is
possibly too aggressive.

On the lines of glyph's email, sometime what could be needed is an
option to _only_ mask the POLLIN, not necessairly all other bitflags, so
that I could still receive a disconnect event.

In some ways it might be good not to get a disconnect during a deferred,
but OTOH the fact it doesn't notice a disconnect, prevents to leave the
pauseProducing enabled for an extended period of time, while I could
really do that in theory (I can't do that or I would lose the disconnect
event with pauseProducing).

But overall this would be an additional (minor) feature, quite
orthogonal with the "hard" approach of pauseProducing. And having the
API of int32/int16 in sync with linereceiver sounds a better approach
for the short term, plus the reentrancy bugfix sounds good to have.

Thanks everyone for the help and sorry for not having much time to
provide unit test.

More information about the Twisted-Python mailing list