Fiber local GC

Ola Fosheim Grøstad via Digitalmars-d digitalmars-d at puremagic.com
Sat Jun 25 03:33:00 PDT 2016


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).



More information about the Digitalmars-d mailing list