I have long thought that a coroutine mechanism was one of the most unfortunate omissions from the ANSI Common Lisp standard. The Lisp Machines had a mechanism called "stack groups" that supported efficient coroutines, but I guess it wasn't considered critical for Common Lisp to have such a thing. As you've noticed, though, adding coroutines in a way that's general, efficient, and portable is very hard.
Shameless plug: I had created a similar library[0] for common lisp, though it didn't use conditions and restarts, also lacked a definitive yield construct. It still is profound how a major feature for other programming language is trivial to add to common lisp.<p>[0]: <a href="https://github.com/ykm/cl-iterators" rel="nofollow">https://github.com/ykm/cl-iterators</a>
I presented a very similar implementation here: <a href="http://lisp-univ-etc.blogspot.com/2016/05/improving-lisp-ux-one-form-at-time.html" rel="nofollow">http://lisp-univ-etc.blogspot.com/2016/05/improving-lisp-ux-...</a>
Still, a lot of interesting questions remain, which are discussed here: <a href="http://lisp-univ-etc.blogspot.com/2016/05/improving-lisp-ux-one-form-at-time.html#comment-2682947352" rel="nofollow">http://lisp-univ-etc.blogspot.com/2016/05/improving-lisp-ux-...</a>
TXR Lisp is a dialect with CL roots, supporting delimited continuations.<p>They can be used directly via a lower-level API or via the obtain/yield mechanism.<p><a href="http://www.nongnu.org/txr/txr-manpage.html#N-01C4E6B4" rel="nofollow">http://www.nongnu.org/txr/txr-manpage.html#N-01C4E6B4</a><p>Here is an example of obtain/yield wrapped in the object system to create green-thread-like objects:<p><a href="http://www.nongnu.org/txr/rosetta-solutions-main.html#Synchronous%20concurrency" rel="nofollow">http://www.nongnu.org/txr/rosetta-solutions-main.html#Synchr...</a>