The "no gc" crowd

Jonathan M Davis jmdavisProg at gmx.com
Thu Oct 10 17:51:47 PDT 2013


On Friday, October 11, 2013 02:05:19 Sean Kelly wrote:
> It would be yet another step
> towards not having thread-local pools though.

At this point, I don't see how we can have thread-local pools unless casting 
to and from shared has hooks for managing that. Otherwise, it's far too likely 
that an object is going to be in the wrong pool, because it's being used as 
shared when it was constructed as thread-local or vice versa. And we may need 
some sort of hook with std.concurrency.send which understands that the object 
being sent is being transferred from one thread to another and would tell the 
GC to migrate the object from one pool to another (though to do that, it would 
probably have to not be typed as shared but rather as thread-local, which 
would jive better with what you're talking about doing with std.concurrency).

Certainly, with how shared currently works, it's hard to see how we could get 
away with having thread-local GC pools as great as that would be. So, if we 
want that, something about how shared works is going to have to change.

- Jonathan M Davis


More information about the Digitalmars-d mailing list