shared vs __gshared
Steven Schveighoffer
schveiguy at yahoo.com
Mon Jun 10 19:52:41 PDT 2013
On Mon, 10 Jun 2013 22:33:03 -0400, Sergei Nosov <sergei.nosov at gmail.com>
wrote:
> So, is my understanding correct? If yes, why the path with memory
> barriers was "announced", but not taken?
Having recently acquired (no pun intended) new knowledge on how hard
memory races are to solve with language syntax and primitives, I can
appreciate that there isn't a silver bullet way to do this.
BUT, shared should be something more than just a way to modify a type to
say "DON'T USE ME, I SUCK!" I think we need one more mechanism to fix
this. Something that allows one to move data from shared to unshared in a
reliable and provable way. Because really, you never want to directly
work with shared data without claiming and proving ownership of the data,
even if temporarily.
-Steve
More information about the Digitalmars-d-learn
mailing list