It seems there're already several thread implementations, as I noticed there're Bordeaux Threads, Portable-Threads, and 《The Common Lisp Cook Book》 also gives a way to implement multi-threads, the package mp which I don't known how to involve it in my program, I can't find this package.
The problem is how can I choose a proper multi-threads library to meet my demand, as I'm also a C programmer, it's better like pthread, but it doesn't matter, I wonder which it's the most used multi-threads library, or what is the regular way for multi-threads programming in Common Lisp.
According to Quicklisp stats for November bordeaux-threads is heavily used but I don't see portable-threads or any other implementations. So I guess you could try it and see if it meets your needs and look for another implementation if it doesn't.
I've barely used it but I've found it easy to use and the API documentation is rather clear.
Actually, the de facto threading standard for Common Lisp is Bordeaux Threads (bt)
, which is a portability layer over threading APIs of different implementations.
mp
(which stands for multi-processing) is how threading API is called in LispWorks (and, if I'm not mistaken, Franz CL). You can use it directly (just like sb-thread
in SBCL), if you are developing for some specific implementation, or you can rely on bt
, if you aim for portability across all currently active implementations with threading support (CLISP doesn't have it at all).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With