tl;dr you can actually generalize trampolining quite a bit in order to get co-operative threading.
Reply on news.ycombinator.com