[Twisted-Python] Cancel a Deferred timeout

Glyph Lefkowitz glyph at twistedmatrix.com
Wed Feb 12 10:18:07 MST 2003


On 12 Feb 2003 17:21:51 +0100, Thomas Heller <theller at python.net> wrote:

> I thought using a deferred for this with a timeout of one second, which will
> close the connection if the timeout callback is called.  If the line-feed is
> received, the deferred timeout must be canceled, and a fresh one set up. How
> can I do this?

It sounds more like you might want to use reactor.callLater directly: a
Deferred is a one-shot thing, which is best used to represent a request for
data.

-- 
 |    <`'>    |  Glyph Lefkowitz: Traveling Sorcerer   |
 |   < _/ >   |  Lead Developer,  the Twisted project  |
 |  < ___/ >  |      http://www.twistedmatrix.com      |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: </pipermail/twisted-python/attachments/20030212/8e2df235/attachment.sig>


More information about the Twisted-Python mailing list