Sharing in D

Bruno Medeiros brunodomedeiros+spam at com.gmail
Mon Aug 11 11:16:12 PDT 2008


Walter Bright wrote:
> Steven Schveighoffer wrote:
>> Now, Let's say you have thread 1 which calls bar.  So now thread 1's 
>> x2 and obj._x point to the exact same data, which is both viewed as 
>> shared and unshared at the same time.  Is this something that should 
>> be allowed?  Would you not make the assumption that you can do 
>> whatever you want with what x2 points to without synchronization 
>> because it is unshared?  Maybe I don't completely understand what you 
>> are intending for shared to mean.
> 
> Eh, I think you've got me there. Looks like unshared cannot be 
> implicitly converted to shared.

Akin to why const cannot be implicitly converted to invariant, no?


-- 
Bruno Medeiros - Software Developer, MSc. in CS/E graduate
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list