Making RCSlice and DIP74 work with const and immutable

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Mar 2 13:14:43 PST 2015


On 3/2/15 4:10 PM, Steven Schveighoffer wrote:

> Just as an aside, I know that immutable is implicitly shared because it
> does not need to be synchronized with a mutex. This makes it ideal for
> sharing. But the reality is, there are other reasons to make something
> immutable. And it poisons const in this way. Note that the array runtime
> still treats const items as thread local, not shared. This could
> potentially cause problems if you shared a tail-immutable array, and
> tried appending.

All this, except I meant the array runtime treats both const *and* 
immutable items as thread-local.

-Steve



More information about the Digitalmars-d mailing list