[issue41176] revise Tkinter mainloop dispatching flag behavior

Richard Sheridan report at bugs.python.org
Sun Jul 5 08:30:07 EDT 2020


Richard Sheridan <richard.sheridan at gmail.com> added the comment:

I'd like to consider one more possibility for future behavior that sort of came to mind while discussing the PR. In current behavior, it is possible to use `willdispatch` to trick `WaitForMainloop` into letting a thread pass through the timeout, where it will eventually wait on a `Tcl_ConditionWait` in `Tkapp_ThreadSend`. 

This could be very efficient default behavior, since no polling is required; the thread just goes when the loop comes up. Is it possible to make this a well-documented feature and default behavior of tkinter? Or would it be too surprising for new and existing users? It would be important to make sure that threads aren't silently getting lost in old programs and new users can figure out they need to call `mainloop`, `doonevent`, or `update` when not on the REPL or the thread will hang.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41176>
_______________________________________


More information about the Python-bugs-list mailing list