Mark Roseman added the comment:

Figured out the cause of this hang, it was to do with the nested event loops.

It turns out that mainloop() really should just be for the mainloop. Or at 
least quit() should only be used to quit the outer loop, as it relies on 
setting a static variable, so is not reentrant, i.e. does not handle nested 
event loops.

I changed the nested loop to use a different mechanism to start the nested 
event loop (vwait, which waits for a tcl variable to be set) and terminate the 
nested loop (setting that variable). Have attached fix-nested-mainloop.patch.

Fixes the problem here, and in #15348, and another case I was using (start, 
enable debugger, open module, run module, quit).

The one in #24455 is something different, I'll look into it.

----------
keywords: +patch
Added file: http://bugs.python.org/file40550/fix-nested-mainloop.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15347>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to