[Semi-OT] Fibers vs. Async / Await
rikki cattermole
rikki at cattermole.co.nz
Thu May 12 10:31:35 UTC 2022
On 12/05/2022 9:16 PM, IGotD- wrote:
> I'm not saying that it is wrong to do the entire implementation in
> druntime but it is a lot of work and only the most common CPU
> architectures will be supported. There is also the risk that it becomes
> outdated as CPU vendors add stuff to their CPUs.
>
> I think since the D project has such limited resources, it should go for
> as generic solutions and reuse existing APIs. Async/Await is becoming
> accepted as a programming model and I think that D should put its effort
> to support that.
The cost to maintain our fiber implementation is very minimal.
Prior to the refactor 3 years ago, a whole pile of the context switch
assembly was last touched like 8-13 years ago.
https://github.com/dlang/druntime/blame/3ead62a9bf4e0f866af10fdd3bc4edeb87237305/src/core/thread.d#L3754
ABI's are generally stable for this stuff. If they weren't a lot of
userland would break and there would be no way to fix things.
More information about the Digitalmars-d
mailing list