Common Lisp Threads

The CommonLispHyperSpec does not standardize thread support for CommonLisp. This is unfortunate, but not uncommon for language standards of around that time.

Possible sources of information:


Franz's AllegroCommonLisp has thread support. On Windows, they use OS threads, but only one thread can execute Lisp at a time -- foreign calls are non-blocking. Thread support on other platforms apparently uses "green" threads -- the threading is emulated within the Lisp process, a strategy that is also often implemented in other languages.

See: http://www.franz.com/support/tech_corner/newmp-090504.lhtml

CormanCommonLisp? supports OS threads on Windows.

CLisp does not to support threads.


Lisp threading status (googled 2005-02-21, updated partially 2007-02-17)


Would someone mind explaining why it is such a problem to add threads to Lisp, if it is not too complicated for a non-Lisp user? I have read through WhyWeHateLisp which seems to focus on the lack of thread support as one of the main reasons it is not more widely used.

It isn't that Lisp doesn't have threads. It is that thread support in Lisp isn't part of the standard... every Lisp implementation is off doing its own thing, and sometimes that thing can also vary on a per-platform basis, harming both portability between implementations and between operating systems. Lisp could do better, but C/C++ and many other languages suffer from the same problem.

Lisp seems really interesting and seems to have a lot of support from seasoned developers, but it would be nice to have some comfort that I could eventually develop business applications without worrying about issues such as threading.

That's easy. For the most part, regular business applications don't need threading... which is fortunate because the moment you introduce threading you shouldn't not worry about threading issues. Even languages that standardize thread support often could do much better in reducing "issues such as threading". I'd personally like to see SoftwareTransactionalMemory and a composable atomic block keyword instead of primitive mutexes and monitors (with their potential for deadlock, livelock, their lack of composability tending to violate modularity, etc.). I also wouldn't mind a more message-passing concurrency model (even if messages are 'passed' efficiently in shared memory).


CategoryLisp


EditText of this page (last edited June 5, 2011) or FindPage with title or text search