We were talking about what features of Interlisp were important to development of the residential environment. I thought spaghetti stacks were poorly credited.
which implementations of common lisp are thread safe?
Common Lisp implementations vary in their threading support and thread safety:
Fully thread-safe with native threads:
- SBCL (Steel Bank Common Lisp) — has native threads on Linux, macOS, and Windows via
sb-thread. Generally considered the most robust for multithreaded use, though some parts of the standard library are not thread-safe by default.
- CCL (Clozure CL) — designed with threading in mind from early on; native threads, good thread safety across its runtime.
- LispWorks — commercial implementation with mature, well-documented thread support (called "multiprocessing").
- Allegro CL — commercial, mature threading support with
mp (multiprocessing) package.
- ABCL (Armed Bear Common Lisp) — runs on the JVM, so threading inherits Java's threading model; reasonably thread-safe.
Limited or cooperative threading:
- ECL (Embeddable Common Lisp) — has POSIX thread support, but thread safety can be inconsistent depending on the operation.
- CMUCL — has some thread support on certain platforms but is less mature than SBCL.
No real threading:
- CLISP — no native thread support; effectively single-threaded.
- GCL (GNU Common Lisp) — minimal threading support, not recommended for concurrent use.
Practical notes:
- The Bordeaux Threads library (
bt) provides a portable threading API across implementations and is the standard way to write portable multithreaded CL code.
- SBCL + Bordeaux Threads is the most common production choice in the open-source ecosystem.
- Even in thread-safe implementations, the garbage collector and certain I/O operations may require locking. Libraries like lparallel and chanl build higher-level concurrency abstractions on top.
- Thread safety of your code is separate from the implementation's runtime safety — you still need to manage shared state carefully with locks or atomic operations.
If you're starting a new multithreaded project, SBCL or CCL with Bordeaux Threads is the most well-trodden path.