On Thursday, 10 October 2013 at 04:24:31 UTC, Jonathan M Davis wrote:
Also, casting _away_ shared is going to be a very common operation due to
how shared works.

It is yet another use case for `scope` storage class. Locking `shared` variable via mutex should return same variable but casted to non-shared `scope` (somewhere inside the locking library function). Then it is safe to pass it to functions accepting scope parameters as reference won't possibly escape.

Reply via email to