Repository navigation
gh-162650: Fix tkinter calls from other threads after a nested mainloop() - #162651
Conversation
…mainloop() A nested mainloop() now restores the dispatching flag instead of resetting it, so the outer mainloop() still accepts calls from other threads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
Sorry, @serhiy-storchaka, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
GH-162673 is a backport of this pull request to the 3.15 branch. |
|
GH-162674 is a backport of this pull request to the 3.14 branch. |
|
Looks like this is failing on AMD64 Windows Server 2025 Refleaks 3.x, tier 1. Needs a fix like in #161368? |
|
Thank you. This is a part of a bigger problem: Tcl allocates per-thread resources which are only freed by |
A nested
mainloop()reset the flag which tells that the interpreter dispatches events, even if the outermainloop()was still running, so calls from other threads failed withRuntimeError: main thread is not in main loopafter it exited. It now restores the previous value of the flag.🤖 Generated with Claude Code