[Twisted-Python] Multiple main loops

glyph at divmod.com glyph at divmod.com
Thu May 4 10:32:32 EDT 2006


>glyph at divmod.com wrote:
>>Why is a second event-loop necessary here?

>Hi Glyph. I believe that performance would suffer using a single loop. I am 
>not aware of any evaluation to provide evidence of the extent of the impact 
>this would have.

Fair enough.

>The thought of using the existing reactor for communication and serving has 
>not escaped me. Once I have a syncing server working in twisted with 
>whatever protocol I use, I will have the chance to evaluate performance on a 
>couple of levels. This discussion for me has a bit more to do with 
>possibilities and exploring boundaries at this point. Googling for 
>information, I came across the patch that also suggested the possibility of 
>multiple independent reactors. This possibility is interesting to me,  even 
>outside of zope.

Despite the fact that I don't have a similar use-case on a real server or client, it's also interesting to me.  It would definitely make certain test-cases easier to write, and easier testing == more tests.  :)

I previously suggested that perhaps you could write tests for that patch, to verify that multiple reactors could actually run simultaneously.  That was a serious suggestion: if you'd like Twisted to support this feature, you can almost certainly get it accepted if there are accompanying test cases.  I'll commit to doing the reviews if you submit the patches.




More information about the Twisted-Python mailing list