better c fibers

Dukc ajieskola at gmail.com
Mon Sep 27 19:05:46 UTC 2021


On Tuesday, 21 September 2021 at 09:37:30 UTC, Abby wrote:
> Hi there,
> I'm new in dlang I specially like betterC. I was hoping that d 
> fibers would be implemented in without using classes, but there 
> are not. Is there another way how to use async/await in dlang 
> better c?
>
> Thank you for your help
> Abby

A C or C++ concurrency library should work.

Another option, if you just want fibers but not true concurrency, 
would be to do some assembly trickery. Probably not too hard if 
you know assembly, but not very portable.

If the reason you're using `-betterC` is targeting asm.js or 
WebAssembly, you will need to use the JavaScript APIs of your 
environment for concurrency.


More information about the Digitalmars-d-learn mailing list