Fiber local GC

qznc via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 25 03:49:43 PDT 2016


On Saturday, 25 June 2016 at 10:33:00 UTC, Ola Fosheim Grøstad 
wrote:
> Pony has a fiber local GC, which means collection can happen 
> when the fiber is inactive  or even altogether skip collection 
> if the fiber is short-lived.
>
> Go is currently exploring a Transaction Oriented GC addition to 
> the concurrent GC it already has:
>
> https://docs.google.com/document/d/1gCsFxXamW8RRvOe5hECz98Ftk-tcRRJcDFANj2VwCB0/edit
>
> It takes the same viewpoint. A go-routine (fiber) that is 
> short-lived (like a HTTP request handler) can release 
> everything in one swipe without collection.
>
> I think this viewpoint is much more efficient and promising 
> than D's thread-local viewpoint.
>
> What D needs is a type qualifier that keeps data "fiber local" 
> and possibly a transition mechanism like Pony has for detecting 
> objects that should be allocated on a global heap (or less 
> efficiently, "pin objects" that are exported outside the fiber).

D does not even have thread-local GC.

Since fibers are bound to a thread, a thread-local GC would help 
as well. The hard part is how to make it safe.


More information about the Digitalmars-d mailing list