On Tuesday, 13 May 2014 at 06:06:40 UTC, Rainer Schuetze wrote:
This comes up from time to time, but to me it is very blurry
how this can work in reality.
The paper I linked on Friday [0] presents a collector like this.
Are there concerns I've missed that make that not applicable?
Considering how "shared" is supposed to be used to be useful
(do some locking, then cast away "shared") there is no
guarantee by the language that any object is actually thread
local (no references from other threads). Working with
immutable (e.g. strings) is shared by design.
I'm not seeing much in the documentation, but from what I can
tell (per the FAQ), shared in D just guarantees it's on the
global heap?
-Wyatt
[0]
https://research.microsoft.com/en-us/um/people/simonpj/papers/parallel/local-gc.pdf