Low-Lock Singletons In D

Mehrdad wfunction at hotmail.com
Tue May 7 16:07:24 PDT 2013


On Tuesday, 7 May 2013 at 22:44:28 UTC, Andrei Alexandrescu wrote:
> The writer is only half of the equation. The reader has its own 
> cache to worry about and its own loading order.



Oooh! so basically this is the scenario you're referring to?

1. The reader has the uninitialized data in its cache
2. The writer writes the new data and a pointer to the new data
3. The reader sees a new pointer and attempts to load the new data
4. The reader receives stale data from its cache


In that case....

> I'm not claiming, I'm destroying :o)

... well done!!



> There is. I know it's confusing. You may want to peruse the 
> reading materials linked by others.

Ok thanks!


More information about the Digitalmars-d mailing list