On 10:42 pm, ter...@gmail.com wrote:
On Fri, Jan 22, 2010 at 4:40 PM,  <exar...@twistedmatrix.com> wrote:
On 21 Jan, 03:30 pm, ter...@gmail.com wrote:
[snip]

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.

Actually I noticed this problem in my old wxPython/Twisted application.
Before upgrade everything was sweet and shiny but when I upgraded
Twisted to 9.0 my application suddenly started to hang on exit. BTW
I use wxreactor and install it exactly as in doc/core/examples/wxdemo.py

It is interesting that doc/core/examples/wxacceptance.py has no such a problem,
but doc/core/examples/wxdemo.py has! If I start it, wait till it
prints to stdout
"two seconds passed" and then try to quit it either by File->Exit or by clicking on the WM close button it does not respond, even if I hit Cntrl-C in the
terminal from where I run it, but if after Cntrl-C I go to the
File->Exit it quits
after printing "Received SIGINT, shutting down."

This sounds familiar. I think wxreactor has some wake-up issues. It's not a very reliable reactor. wxPython differs in various ways on different platforms and from release to release in ways which wxreactor doesn't account for.

I think the problem with the dns example is probably not related to your wxreactor issues at all.

Jean-Paul

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to