A separate GC idea - multiple D GCs

Sebastiaan Koppe mail at skoppe.eu
Sat Jan 22 15:14:30 UTC 2022

On Friday, 21 January 2022 at 13:56:09 UTC, Chris Katko wrote:
> So I was going to ask this related question in my other thread 
> but I now see it's hit over 30 replies (!) and the discussion 
> is interesting but a separate topic.
> So a related question: Has anyone ever thought about 
> "thread-local garbage collection" or some sort of "multiple 
> pool [same process/thread] garbage collection"? The idea here 
> is, each thread [or thread collection] would have its own 
> garbage collector, and, be the only thread that pauses during a 
> collection event.

Instead of segregating GC by execution contexts like threads or 
fibers, I think it makes more sense to separate it by task 

When making the most of multiple cores you try to limit 
synchronizations to tasks boundaries anyway. So a task itself 
basically runs isolated. Any memory it burns through can 
basically be dropped when the task is done.

Of course the devil is in the details, but I think it is more 
promising than segregating by execution context.

More information about the Digitalmars-d mailing list