[Twisted-Python] Stopping and restarting the reactor

Jp Calderone exarkun at divmod.com
Wed Jun 1 20:11:43 EDT 2005


On Wed, 01 Jun 2005 15:58:01 -0700, Brian Granger <bgranger at scu.edu> wrote:
>Hello,
>
>I am using twisted's client capabilities in an interactive setting. 

How are you driving this interaction?  I could argue that the vast majority of Twisted applications fall into this category - for example, a Twisted web server is interacted with using an HTTP client; a Twisted mail client is interacted with using GUI widgets or a manhole shell. Neither of these cases demands the reactor stop while the interaction proceeds: in the ideal case, the interaction merely needs to be event driven.  In your case, it sounds like simply blocking for a while *while the reactor runs* is sufficient.  This will let whatever blocking mechanism you currently use to interact with the user to continue functioning, without dragging the problems of stopping and restarting the reactor into the picture.

Jp




More information about the Twisted-Python mailing list