Tal Einat <taleinat+pyt...@gmail.com> added the comment:

During finalization, TkFinalizeThread would call DeleteWindowsExitProc 
(registered via TkCreateThreadExitHandler). This in turn is set as a 
thread-exit handler via Tcl_CreateThreadExitHandler upon the first call to 
TkCreateThreadExitHandler.

Now we're out of Tk and into Tcl itself. TkFinalizeThread would be called by 
Tcl's Tck_FinalizeThread. This, in turn, is called by Tcl_Finalize (for thread 
number zero?). And _tkinter sets an atexit handler to call Tcl_Finalize.

Ah, but no! That handler is actually not set, due to the "#if 0" before it! So 
the Tcl/Tk finalization is actually skipped, causing this issue.

----------

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

Reply via email to