[Twisted-Python] Re: Local IP and factory shutdown

Gill, Mandeep mandeep.gill at imperial.ac.uk
Wed Jun 23 19:32:03 EDT 2004


>Note that we've had fine luck using the standard reactor and iterating
>it via a wxTimer, based off of the entry at:
>
>  http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/181780
>
>You do end up enforcing some time granularity on the network due to
>whatever timer frequency you pick, but so far it's been more than
>sufficient for our applications.
>
>The tweaks we made were to shorten the timer to about 150ms, and
>explicitly stop the timer and reactor in an OnExit() routine.  I also
>experimented with additional reactor iterations in an Idle handler,
>but found that they really didn't make that much of a difference in
>network performance.
>
>Note that most of our wx-based applications are GUI interfaces, so the
>interface is the primary application with the networking in support of
>that.  For those whose application is the opposite (the GUI is an
>add-on to the protocol support) it might be more limited by the impact
>of the periodic reactor execution, I'm not sure.
>
>-- David

Thanks for the tip, I have tried such a method myself and it does seem to work with GUI focused apps. Unfortunately in my particular case the app has tight timing requirements due to multiple RTP instances each with a period of 30ms which wxTimer cannot meet.

Mandeep
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3319 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20040624/dafeeaba/attachment.bin 


More information about the Twisted-Python mailing list