[Twisted-Python] can the reactor be told to stop processing events and to just queue them?
Gabriel Rossetti
gabriel.rossetti at arimaz.com
Thu May 27 08:49:39 EDT 2010
Itamar Turner-Trauring wrote:
> 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).
>
>
ok
>> 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?
>
>
Ok, thanks, I'll try that.
More information about the Twisted-Python
mailing list