is(Mutex == shared) == false?
Sönke Ludwig
sludwig+dforum at outerproduct.org
Mon Feb 17 00:29:37 PST 2014
Am 11.02.2014 06:58, schrieb Sean Kelly:
> On Saturday, 8 February 2014 at 16:46:26 UTC, Stanislav Blinov wrote:
>> Also, on a related note, is there any benefit in having core.sync
>> primitives not final? What would be a use case to inherit from e.g.
>> Mutex or Condition? GC does that with Mutex, but only to devirtualize
>> all methods :)
>>
>> Maybe we should also consider making them final along the way?
>
> Probably. The new std.concurrency patch overrides Condition, but mostly
> for convenience. I think those methods not being virtual was an
> oversight on my part.
vibe.d currently (ab)uses this fact to be able to use its own mutex
class as object monitors and for use in synchronized blocks. I agree
that they should generally be final, but please let's add another way to
plug in there when doing such a change.
More information about the Digitalmars-d
mailing list