[Python-Dev] [Twisted-Python] Newbie question

Timothy Fitz TimothyFitz at gmail.com
Thu Sep 7 15:55:09 EDT 2006

On 9/7/06, glyph at divmod.com <glyph at divmod.com> wrote:
> On Thu, 7 Sep 2006 15:01:08 -0400, James Y Knight <foom at fuhm.net> wrote:
> >However, even though it'd be possible to fix, perhaps it is better to
> >simply throw an exception on the second reactor.run(), since most  people
> >who do that shouldn't actually be running the reactor twice,  they just
> >didn't know the better thing to do yet.
> I think that's a good idea.  Based on the nature of the questions that I've seen, I think that this would probably be a good idea even if we *did* have a restartable reactor.  Add an interface, IRestartableReactor, and require people who want to use it to call 'reactor.restart()'.  While this might not actually *do* anything, the conspicuous absence of it from any example code and a potentially useful error message from reactor.run would prevent the question from being asked repeatedly...

I've added this to the tracker
[http://twistedmatrix.com/trac/ticket/2066], further discussion should
probably be taken there.

More information about the Twisted-Python mailing list