How to Best Use core.sync.rwmutex
Sean Kelly
sean at invisibleduck.org
Mon Sep 26 15:25:03 PDT 2011
On Sep 26, 2011, at 12:22 PM, Andrew Wiley wrote:
> On Mon, Sep 26, 2011 at 10:43 AM, Sean Kelly <sean at invisibleduck.org> wrote:
>> On Sep 26, 2011, at 12:54 AM, Andrew Wiley wrote:
>>>
>>> Actually, I keep trying to come up with a code sample for this, and
>>> I'm not managing to find anything that works and makes any sense
>>> because the shared keyword propagates to the members, so I have to
>>> lock the rwmutex to lock one of its submutexes, and I'm not getting
>>> that to work with the type system at all. Could someone who's done
>>> more with shared/synchronized post a code sample of what this should
>>> look like?
>>
>> shared hasn't yet been applied to the classes in core.sync, so what you're seeing is expected. I should really fix this however. It just has a tricky cascade effect on declarations within core.sys.posix.
>
> Does that include core.sync.condition?
All of them. They're absolutely safe to use, obviously, but the type system will complain.
More information about the Digitalmars-d
mailing list