better c fibers
SealabJaster
sealabjaster at gmail.com
Sun Sep 26 09:48:58 UTC 2021
On Tuesday, 21 September 2021 at 09:37:30 UTC, Abby wrote:
> ...
I'm not aware of any -betterC package specifically for coroutines.
I have some work done in this regard, but sadly the library
itself isn't really usable at all so if you want to put in the
effort you'd have to probably extract the code out, but that's
quite a bit of effort:
https://github.com/BradleyChatha/bcstd/tree/master/source/libd/async
To make it even more annoying there's also an ASM file you'd have
to deal with:
https://github.com/BradleyChatha/bcstd/blob/master/source/asm/coroutine.nasm
Alternatively you could go for a C coroutine library, which
should function *ok-ish*, but not perfect, but would likely be
much easier than the above suggestion.
Or write your own, as is a common suggestion around here :3
Libaco provides the general gist of how it works:
https://github.com/hnes/libaco#proof-of-correctness
More information about the Digitalmars-d-learn
mailing list