[dmd-concurrency] CSP: Communicating sequential processes
Andrei Alexandrescu
andrei at erdani.com
Wed Jan 20 08:37:49 PST 2010
By the way, Sean, is it ok if I don't describe anything beyond
"synchronized" in TDPL with regard to lock-based coding?
Andrei
Sean Kelly wrote:
> On Jan 20, 2010, at 7:39 AM, Sean Kelly wrote:
>
>> On Jan 20, 2010, at 4:28 AM, Michel Fortin wrote:
>>> I'd like to note that even upgrading the lock to a write lock might be a problem: as I said in my other message, making this an automatic upgrade might force the release the reader lock until the writer lock is acquired, which would be unexpected from test()'s point of view.
>> ReadWriteMutex is implemented internally using a mutex and condition variable, so the basic process would be:
>>
>> Upgrade:
>>
>> * set thread-local heldReadLock flag
>
> Um... thread-local per instance of the ReadWriteMutex, which means an associative array or the like. So this bit actually adds a fair bit of complexity to the design.
> _______________________________________________
> dmd-concurrency mailing list
> dmd-concurrency at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/dmd-concurrency
More information about the dmd-concurrency
mailing list