Synchronized Classes and Struct Members

Gor Gyolchanyan gor.f.gyolchanyan at gmail.com
Tue Oct 25 09:35:02 PDT 2011


What? Are you sure? It's supposed to be! Sharedness of the method is
the sharedness of the _this_ parameter, which must cause overloading,
since shared-ness of a type is part of the type.
If so, it's definitely a bug.

On Tue, Oct 25, 2011 at 8:24 PM, Andrew Wiley <wiley.andrew.j at gmail.com> wrote:
>
>
> On Tue, Oct 25, 2011 at 8:06 AM, Gor Gyolchanyan
> <gor.f.gyolchanyan at gmail.com> wrote:
>>
>> And so you can have both thread-safe synchronized heavy-duty container
>> and a fast and small container all in one just by overloading the
>> appropriate methods and adding appropriate synchronization blocks in
>> the shared ones.
>> This is one of those "little" advantages of D over C++, that make my
>> life _SO_ much easier.
>>
>
> Except that overloading shared and non-shared methods is not allowed.


More information about the Digitalmars-d mailing list