Struct with default ctor (Was: [dmd-beta] dmd 2.064 beta take 2)
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun May 19 16:39:06 PDT 2013
On 5/19/13 7:06 PM, deadalnix wrote:
> On Sunday, 19 May 2013 at 22:32:58 UTC, Andrei Alexandrescu wrote:
>> How was there a bug if everything was properly synchronized? You
>> either describe the matter with sufficient detail, or acknowledge the
>> destruction of your anecdote. This is going nowhere.
>>
>
> I explained over and over. A field is initialized to null, while the
> object lock is owned, and later to its value, while it is locked. In the
> meantime, another thread access the object, owning the lock, assuming
> the field is always initialized.
How does another thread thread accesses the object "owning the lock"
when the assignment occurs under lock?
How would non-null fix this? Would the object have type Maybe?
Andrei
More information about the Digitalmars-d
mailing list