Stackless resumable functions

Sean Kelly via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 24 10:15:42 PDT 2014


On Friday, 24 October 2014 at 10:33:40 UTC, Martin Nowak wrote:
> This is so much better than Fibers.
> http://youtu.be/KUhSjfSbINE
>
> What I like most about the proposal is that you can adapt await 
> by specializing template functions, similar to how range based 
> foreach works.
> It also isn't tied to a particular scheduling mechanism and of 
> course consumes much less memory than stack based suspension.

I'm about halfway through the talk and it's a bit confusing so
far because all of what I'd consider the interesting part seems
to be implemented as a compiler extension and so is invisible by
looking at the code.  He's talking about suspend points in the
function but there's no indication from the code that they are
present where he says.  It seems a bit like these functions are
closures and the compiler is figuring this out according to the
return type or something.  So it's potentially interesting but
difficult to see how this directly compares to classic
coroutines.  I'm hoping all will be clear by the end of the talk.


More information about the Digitalmars-d mailing list