Fifth Annual Tcl/Tk Workshop, 1997 ## PtTcl: Using Tcl with Pthreads D. Richard Hipp, Hwaci, Charlotte, NC Mike Cruse, CTI, Ltd., Prescott, AZ ### Abstract Tcl is not thread-safe. If two or more threads attempt to use Tcl at the same time, internal data structures can be corrupted and the program can crash. This is true even if the threads are using separate Tcl interpreters. PtTcl is a modification to the Tcl core that makes Tcl safe to use with POSIX threads. With PtTcl, each thread can create and use its own Tcl interpreters that will not interfere with interpreters used in other threads. A message-passing mechanism allows Tcl interpreters running in different treads to communicate. However, even with PtTcl, the same interpreter still cannot be accessed by more than one thread. This paper describes the design, implementation and use of PtTcl. View the full text of this paper in HTML form, PDF (155355 Bytes) form, and POSTSCRIPT (310299 Bytes) form. To Become a USENIX Member, please see our Membership Information.

Need help? Use our Contacts page. |
Technical Program Conference Index USENIX home