Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Using Tcl interpreters in multiple threads

1 view
Skip to first unread message

Valtcho Valtchev

unread,
Oct 23, 1998, 3:00:00 AM10/23/98
to
Hi - I am considering using Tcl interpreters in a multithreaded program.
The main process starts a number of identical threads which at some
point need to execute a Tcl script. Thus each thread has it's own Tcl
interpreter, however, no communication takes place between the different
threads. The multithreaded structure is imposed by an underlying
thread-safe API which interfaces to a multi-channel hardware device.
Which version of TCl should I use - 8.0.3 or 8.1? I have had a brief
look at the Tcl 8.0 sources and they do appear to contain static
variables in including the memory allocation modules. On the other hand
I am not sure if Tcl 8.1 is stable enough at present to employ reliably
in my system (Tcl 8.1 does appear to use thread safety primitives when
compiled with TCL_THREADS). I don't need the ability to start threads
from Tcl, and the separate running threads do not communicate with each
other.

Any help/suggestions will be greatly appreciated.

Regards

Valtcho Valtchev

Alan L. Folsom, Jr.

unread,
Oct 23, 1998, 3:00:00 AM10/23/98
to Valtcho Valtchev

Valtcho Valtchev wrote:

Use Tcl8.1a2. I have found it to be thread safe for applications as you
describe,
and am currently using it in a similar application. Be aware that you may
run into
problems using Tk, although Tcl itself works fine. By the way, I've worked
out a
couple tricks for inter-thread communications, so that is possible also.

Cheers,

Al Folsom

Lee F Bernhard

unread,
Oct 23, 1998, 3:00:00 AM10/23/98
to fol...@jmisoftware.com
I'm doing some work to add thread-safety to Tk 8.1. I would appreciate
reports of any difficulties in using Tcl 8.1 with multiple threads.

Thanks,
Lee

______________________________________________________
Lee F. Bernhard lee.be...@scriptics.com
phone: (650) 843-6914 fax: (650) 843-6909
Scriptics Corporation http://www.scriptics.com

The Tcl Platform Company

0 new messages