Here's a question the article doesn't answer: why Common Lisp? I.e. why not Scheme? Scheme is a plenty powerful language these days with all the libraries it has available. Granted, it doesn't have history going back to the 1950s, but it does date back to the 1970s. There are also multiple implementations, each with its own set of strengths. And there are some solid standards written for the language that have good i…
That's a very good question and the same thing I ask myself whenever I consider using some lisp (for hobby purposes mostly). I came to the conclusion that scheme is a better language from a technical standpoint and I enjoy using it more, but the primary issue is that lisp is already sort of niche, and scheme is like a niche inside of a niche, which in practice results in the "ecosystem" being very weak. By ecosystem,…
I have some good news for you, then! Cooperative threading was added in Emacs 26:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Th...
https://www.emacswiki.org/emacs/NoThreading
I've never used it, but the big disadvantage seems to be that unless you're going to do some super advanced macrology, any function you run within a thread needs to explicitly call `thread-yield` in order to yield back to the scheduler so other threads can run. I don't know of any library or anything that makes it so you can just take a function that isn't thread-aware, run it concurrently with other possibly not thread-aware functions, and have it all work sensibly, but at least the building blocks are there.
---
If that doesn't suit you, Emacs 25 introduced generators!
https://www.gnu.org/software/emacs/manual/html_node/elisp/Ge...
Generators have some funky interactions with `unwind-protect`, so handle with care.
---
Finally, there's also a (really old and probably won't work as is anymore, but also probably fun to poke at) coroutine library available:
https://www.emacswiki.org/emacs/CoRoutines
---
I'm sure one of those (probably emacs threads) will meet your needs nicely. :)