Are these options set by default in the binary Windows distributions?
Or do I need to do my own local build?
Thanks in advance...
Debian ships a threaded Tcl by default, the ActiveTcl 8.4.12 distro (at
least on windows) was built with threads enabled. You can check if your
Tcl is thread enabled by looking at the tcl_platform array, if there is
an entry 'threaded' you have a threaded build.
To acutally create and use threads from the script level you need the
threads extension.
Michael
Thread support on Unix is not enabled by default, largely because a
number of popular extensions use signals on that platform and signals do
not work very well with pthreads... :-( (Or at least I think that's
still the case. Anyone know better?)
> Are these options set by default in the binary Windows distributions?
> Or do I need to do my own local build?
You'll need to check the documentation for your distribution, but recent
ActiveTcl distributions contain thread support (and certainly have done
for a while on Windows too, but not as far back as the builds based on
Tcl 8.4.7, which is the last time I updated this machine).
Donal.
On the other hand, it's possible from your description you're trying to
use a single Tcl interpreter (i.e. one Tcl_Interp instance) from
multiple threads. Don't do that; it violates *loads* of deep
assumptions. Send a message to the interpreter's thread instead; that's
supported.
Donal.
Interesting question. I certainly don't know, but I am interested.
Are there any particular sub-versions that should be avoided, because
of bugs in reentrancy?
My understanding is that any Tcl is safe to use in a threaded application
when each thread gets its own interp, and there is no communication
between those Tcl interps. Is my understanding right?
--
Donald Arseneau as...@triumf.ca