Twisted: 1 thread in the reactor pattern

exarkun at exarkun at
Sat Sep 26 16:22:31 CEST 2009

On 25 Sep, 05:25 am, jacopo.pecci at wrote:
>On Sep 24, 7:54 pm, exar... at wrote:
>>On 07:10 am, at wrote:
>> >On Sep 23, 5:57 pm, exar... at wrote:
>> >[snip]
>>If you have a function that takes 5 minutes to run, then you're 
>>the reactor thread for 5 minutes and no other events are serviced 
>>the function finishes running.
>>You have to avoid blocking the reactor thread if you want other events
>>to continue to be serviced.  There are various strategies for avoiding
>>blocking.  Different strategies are appropriate for different kinds of
>>blocking code.
>>Jean-Paul- Hide quoted text -
>>- Show quoted text -
>Even if the server is engaged in a 5 minutes processing other arriving
>requests of callRemote() are queued and  Deferreds are returned

Nope, they're not.  The bytes representing the new requests sit in the 
socket buffer until the function finishes processing and the reactor 
gets an opportunity to read them.
>Could you suggest me any doc to better understand?

If you haven't read 
yet, that may be a good idea.


More information about the Python-list mailing list