Fibers under the hood

Jonathan Marler via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 8 22:15:49 PDT 2016


On Thursday, 9 June 2016 at 05:07:33 UTC, Nikolay wrote:
> On Thursday, 9 June 2016 at 04:57:30 UTC, Jonathan Marler wrote:
>> I've googled and searched through the forums but haven't found 
>> too much on how fibers are implemented.  How does yield return 
>> execution to the caller but then resume execution in the same 
>> place on the next call?  Also some information on how the 
>> fiber call stack works would be nice.  I'm assuming it 
>> allocates the stack on the GC heap.  If so, what is the 
>> default size and is that configurable?  Any information or 
>> pointers to resources that provide this information would be 
>> helpful.  Thanks.
>
> See "Documentation of Fiber internals" inside
> https://github.com/dlang/druntime/blob/master/src/core/thread.d

Exactly what I was looking for, thanks.  Would be nice if this 
documentation was published on the website somewhere (probably in 
the Fiber library documentation).


More information about the Digitalmars-d-learn mailing list