Swift is getting async, structured concurrency and actors
Sebastiaan Koppe
mail at skoppe.eu
Sun Dec 13 15:18:53 UTC 2020
On Sunday, 13 December 2020 at 09:55:29 UTC, Ola Fosheim Grostad
wrote:
> On Saturday, 12 December 2020 at 10:14:20 UTC, Sebastiaan Koppe
> wrote:
>> Are they stackless? Then yes.
>
> AFAIK conceptually, but maybe the current backend have to save
> some state from the top frames and reconstruct it on resume?
> Not sure if current LLVM can support fully stackless, but I
> haven't checked.
I just did and from a cursory glance they are. Of course they
need to allocate whenever they suspend from anything but the
top-level, but most compilers elide that when it can proof the
coroutine doesn't escape the calling function.
If we do want coroutines, we should just steal it all, it is
pretty great work.
More information about the Digitalmars-d
mailing list