DIP 1024---Shared Atomics---Final Review

Walter Bright newshound2 at digitalmars.com
Wed Dec 11 09:30:05 UTC 2019


On 12/10/2019 4:18 AM, RazvanN wrote:
> If you have a const shared variable, do you still need locks to read it?

Yes, because const is a read only view. Other views may mutate it.

Only immutables don't need locks, because then nobody can mutate it.


More information about the Digitalmars-d mailing list