[Twisted-Python] can the reactor be told to stop processing events and to just queue them?

Itamar Turner-Trauring itamar at itamarst.org
Thu May 27 06:27:44 MDT 2010


On Thu, 2010-05-27 at 14:08 +0200, Gabriel Rossetti wrote:
> is there a way to tell the reactor to just queue the events and not to 
> process them for a specific protocol?

No, Twisted doesn't have an event queue (but see below).

>  I have two protocols running on my 
> reactor, one that monitors the network and one for a usb device, I'd 
> like to pause the event processing for the network side when certain 
> msgs arrive on the usb protocol and then unpause it later on. I know I 
> can create a queue and add the network msgs and process them later but I 
> find it redundant to do so when twisted already has an event queue.

How about calling transport.pauseProducing() and then later
transport.resumeProducing() on the TCP connections?





More information about the Twisted-Python mailing list