Lthread - A coroutine lib with multicore support
github.com
github.com
It seems clear that there has to be some limitations compared to traditional single-thread coroutines, but the documentation doesn't explain that. (Conversely, it needs to be more explicit about the advantages of lthreads as well. Coroutines in C are not that all that well known...)
When you create a pthread, it creates an lthread scheduler in it, and any lthread created in this pthread will get associated with the pthread itself. A typical example is to create a global listener socket fd and have several pthreads, each accepting on the same fd and creating lthreads to handle it. the lthreads created in each pthread will stay in their pthread.
It has no limitations to traditional single-thread coroutines btw.