Tcl versions with threads enabled

Gustaf Neumann neumann at wu.ac.at
Mon Feb 6 23:25:54 PST 2012


Am 06.02.12 21:42, schrieb Joshua Root:
> I thought thread support in Tcl was an extension that could be 
> installed separately?
There is tcl-core support for threads (configure option 
--enable-threads), and there is one extension called libthread (you are 
probably referring to), but these are two different things. The tcl-core 
support for threads implements c-level functionalities for mutexes 
(protecting global vars, hash-tables, ...), thread-local storage, uses a 
thread-optimized memory-allocator, different event handling... The 
tcl-core support for threads can be used from the c-level from every 
c-level tcl app, such as e.g. aolserver or naviserver, ... and 
libthread. The libthread extension uses the tcl-core thread support and 
adds script-level support (e.g. shared variables, thread-pool handling, 
...). packages like aolserver or naviserver (i have a port file for that 
read for submission) don't use libthread by themselves.
> IIRC we have some code in our build system that's meant to do just 
> that if we're building against Tcl without threads. If this is the 
> case, a tcl-thread subport would make a lot of sense. - Josh 
The port file implements threads as a variant, other ports can't depend 
on that.
-gustaf neumann



More information about the macports-dev mailing list