Semantics of casting **to** shared?

dsimcha dsimcha at yahoo.com
Sat Sep 4 12:43:25 PDT 2010


== Quote from Jason House (jason.james.house at gmail.com)'s article
> safeD doesn't mean your code is safe... only "memory safe". Similarly, "shared"
sort of partitions data and there is no provably safe way to create or use it. I
have no idea if your example is truly legit safeD or not...

1.  Using __gshared and casting **away** shared are illegal in SafeD.

2.  Low level data races can cause memory corruption if pointers get overwritten
with invalid data.


More information about the Digitalmars-d mailing list