[Twisted-Python] 9.0.0 question

Mikhail Terekhov termim at gmail.com
Fri Jan 22 18:40:57 EST 2010

>>>> 2. Why reactor.stop() hangs if it is called before reactor.run()?
>>> It doesn't.  It raises an exception.  The reason the example hangs is
>>> that
>> Care to elaborate? Who hangs then and why python exits and I see this
>> exception only after I hit Cntl-C?
> I think that's what I explained in the rest of the sentence that is cut off
> above.  You may only see the exception reported later on because the example
> is relying on garbage collection for that reporting.

Please bear with me as I still can't get it. Here is your explanation
for convenience:

> It doesn't.  It raises an exception.  The reason the example hangs is
> that since reactor.stop() was called before reactor.run(), it's not called
> *after* reactor.run().  So the reactor never stops.

So why reactor never stops if it was never run? What it is doing?

Mikhail Terekhov

More information about the Twisted-Python mailing list