Skip to content

Commit 0b44bc3

Browse files
[3.14] gh-124111: Fix TCL 9 thread detection (GH-141482)
(cherry picked from commit dc09870) Co-authored-by: Michael Cho <michael@michaelcho.dev>
1 parent 4316180 commit 0b44bc3

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Updated Tcl threading configuration in :mod:`_tkinter` to assume that
2+
threads are always available in Tcl 9 and later.

Modules/_tkinter.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,12 @@ Tkapp_New(const char *screenName, const char *className,
599599

600600
v->interp = Tcl_CreateInterp();
601601
v->wantobjects = wantobjects;
602+
#if TCL_MAJOR_VERSION >= 9
603+
v->threaded = 1;
604+
#else
602605
v->threaded = Tcl_GetVar2Ex(v->interp, "tcl_platform", "threaded",
603606
TCL_GLOBAL_ONLY) != NULL;
607+
#endif
604608
v->thread_id = Tcl_GetCurrentThread();
605609
v->dispatching = 0;
606610
v->trace = NULL;

0 commit comments

Comments
 (0)