|
2025-06-07
| ||
| 16:00 | • Ticket [2bf9fbcb99] Tcl 9 docs outdated regarding tcl_platform(threaded) (TIP 59... artifact: fe4efd29f6 user: oehhar | |
|
2025-06-06
| ||
| 22:36 | • Closed ticket [2bf9fbcb99]. artifact: c9dce2f83e user: jan.nijtmans | |
| 22:34 | Fix [2bf9fbcb99]: Tcl 9 docs outdated regarding tcl_platform(threaded) check-in: fd1b121aea user: jan.nijtmans tags: core-9-0-branch | |
| 18:11 | • Ticket [2bf9fbcb99] Tcl 9 docs outdated regarding tcl_platform(threaded) (TIP 59... artifact: 3efb99445e user: dgp | |
| 17:28 | • Ticket [2bf9fbcb99]: 4 changes artifact: c423d57d81 user: dgp | |
| 13:09 | • New ticket [2bf9fbcb99]. artifact: 6d120a5b05 user: EricBrunel | |
Tcl 9 docs outdated regarding tcl_platform(threaded) (TIP 599)
According to https://www.tcl-lang.org/software/tcltk/9.0.html, section "Notable incompatibilities", tcl 9 is always thread-enabled, and the build options --enable-threads / --disable-threads have disappeared.
Now in the "tclvars" manual page, it says for the documentation of the array "tcl_platform" that if the variable "threaded" exists in the array, then the interpreter was compiled with threads enabled. So one would suppose that this variable always exists in tcl 9, since it is always thread-enabled. But it doesn't: with a build of tcl 9.0.1 from the sources, there is no variable "threaded" in the array "tcl_platform".
This is a problem, since some interfaces with other languages (namely tkinter for Python) rely on the presence of this variable to know if tcl is thread-enabled or not. If tcl is misidentified as not thread-enabled when it actually is, it causes a lot of issues, and sometimes even crashes.
fd1b121aeaFix [2bf9fbcb99]: Tcl 9 docs outdated regarding tcl_platform(threaded) check-in2025-06-06 22:34:11
The test for a threaded build that is stable in its behavior through Tcl 8.6.* and Tcl 9.* releases is [tcl::pkgconfig get threaded] Code that needs to function with both Tcl 8 and Tcl 9 should be adapted to make use of it. The (pretty serious) bug here is the Tcl 9 docs were not updated.
The elimination of tcl_platform(threaded) is specified by TIP 599.
Doc fix [here]
Thanks for the report, it was indeed 'pretty serious'
A 2nd consequence is that the C macro "TCL_THREADS" is also gone. Here is a description about this: https://core.tcl-lang.org/tcl/wiki?name=Migrating+C+extensions+to+Tcl+9&p