Fibers and cygtls

David McFarland
Sat Sep 5 02:46:16 GMT 2020

> Bottom line is, before trying to use Windows fibers, or before letting
> boost use Windows functions on Cygwin (sigh), check what other POSIX or
> BSD systems provide to implement coroutines.  If there's an API, let's
> implement this API in Cygwin and then use that from user space.

boost-context doesn't actually use Windows fibers by default. Its fiber
implementation (fcontext) uses user-provided buffers for fiber stacks.

The jump implementation is in:

On Linux I believe uses its own asm implementation without any kernel

There's also an implementation (ucontext) using makecontext, which may
be the best option. I'll try that next.

The implementations are compared here:

More information about the Cygwin-developers mailing list