Trying to sort shared data with a predicate causes 'unable to format shared objects'

Ali Çehreli via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 17 11:21:15 PDT 2014


On 06/17/2014 11:17 AM, George Sapkin wrote:
> On Tuesday, 17 June 2014 at 17:18:36 UTC, Ali Çehreli wrote:
>> Shared data can be accessed by more than one thread. Unless it is
>> locked, other threads may see the array in an inconsistent state.
>>
>> Ali
>
> But that's a local copy of it, no? If it's not, will making a local copy
> solve this?
> The original question still stands: how can I resolve this in 2.065?
> Thanks.

As long as you know that no other thread can access the data as its 
being mutated, then that's fine.

There are other cases where 'shared' has to be casted-away at least for now.

Ali



More information about the Digitalmars-d-learn mailing list