Cameron Laird's personal notes on thread programming The mid-June installment of "Regular Expressions" reviewed the state-of-the-threading-art for several prominent scripting languages. We updated this in mid-February 2001, with "Pulling different threads", which illustrates the point that languages differ in esoteric capabilities with an examination of threading models and implementation in Perl, Python, and Tcl.

The Usenet newsgroup comp.programming.threads is a great resource.

Russ Allberry describes thread programming as doing the memory protection, signal-handling, and (some) process management that the OS otherwise does for you. As usual, customization is expensive and dangerous, and often highly satisfying when it works.

Linux Threads Home Page

Fundamentals Of Multithreading

Threading in Ada

Threading in C/C++

comp.programming.threads FAQ

Threading in Forth

Threading in Java

Java Guru: Threads FAQ Home Page

[Explain how since Java has only blocking I/O, Java workers expect threads ...]

Threading in Modula

Threading in Perl

Perl applications re-written to use threads typically become slower.

Booker Bense opines that "Native threads in C can be a big win, in perl to date they are a fun toy to play and learn with." Tom Christiansen rather flamboyantly summarizes that "The only difference is that with LWP, memory access is dangerous, and with standard processes, it isn't." I do agree with Tom that we're poor as a profession at debugging threading. I know I am more comfortable with the (relative) provability of processes, co-routines, or continuations.

Dan Sugalski has written an excellent tutorial on Perl threads. Also recommended: the Thread.pm documentation [establish hyperlink], Michael Schilli's introduction to multithreading, and Tom Christiansen's summary. Sugalski also reports his timing experiments with 5.005-5.006.

In early summer 2000, Perl threading remains a hard problem. There's a lot of hair and slowdown. perl.porters-gw covers this most extensively.

Threading in Python

[Explain.]

Threading in Rexx

[Explain.]

Threading in Smalltalk

Threading in Tcl

Start with the Wiki pages.

Even with Tcl 8.1, only a single thread can access any particular interp; interp trees are "per thread". Most succinctly, Tcl threads communicate only through (Tcl) events.

[Tk not thread-safe--but then, what GUI is, or should be? Swing isn't ...]


Cameron Laird's personal notes on thread programming/claird@phaseit.net