Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-124111: Fix TCL 9 thread detection (GH-128103)
(cherry picked from commit dc09870)

Co-authored-by: Michael Cho <michael@michaelcho.dev>
  • Loading branch information
cho-m authored and miss-islington committed Nov 12, 2025
commit 7bd0cdc75f6b4ec0e4c248b60cd8618dbad240e8
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Updated Tcl threading configuration in :mod:`_tkinter` to assume that
threads are always available in Tcl 9 and later.
4 changes: 4 additions & 0 deletions Modules/_tkinter.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,12 @@ Tkapp_New(const char *screenName, const char *className,

v->interp = Tcl_CreateInterp();
v->wantobjects = wantobjects;
#if TCL_MAJOR_VERSION >= 9
v->threaded = 1;
#else
v->threaded = Tcl_GetVar2Ex(v->interp, "tcl_platform", "threaded",
TCL_GLOBAL_ONLY) != NULL;
#endif
v->thread_id = Tcl_GetCurrentThread();
v->dispatching = 0;
v->trace = NULL;
Expand Down
Loading