[Twisted-Python] how to delay the response in the protocol.Protocol

William Waites ww at groovy.net
Thu Aug 11 13:44:18 EDT 2005

On Thu, Aug 11, 2005 at 10:36:35AM -0700, Andrzej Leszczynski wrote:
> Will try that but this assumes that you know msg at
> point of handling the dataReceived. The hidden part of
> my question is that I would like to deffer/delay
> processing the dataReceived in general becasue of a
> few design reasons. This is why I asked about that
> Deffered. 

Well, then you'd do the same sort of thing:

	reactor.callLater(delay, self.processDataAndSend, data)

> I learn Twisted, so sorry for simple question. Want to
> have most Pythonic/Twisthonic solution.

No need to apologize. Deferreds are not what you are after,
they represent data that will be available at some undefined
but hopefully bounded time in the future. They're note used
for scheduling in the sense that you are talking about.


More information about the Twisted-Python mailing list