[dmd-concurrency] CSP: Communicating sequential processes

Sean Kelly sean at invisibleduck.org
Tue Jan 19 23:11:05 PST 2010


On Jan 19, 2010, at 11:08 PM, Andrei Alexandrescu wrote:

> Sean Kelly wrote:
>> It doesn't currently allow upgrading read locks to write locks, though I think this wouldn't be difficult to add.  More importantly I suppose is that acquiring a concurrent read lock may be more expensive than you'd expect, so you really only want to use a ReadWriteMutex if the read operations take a reasonable amount of time to complete.
> 
> I think pthreads don't allow the upgrade.

Then there's justification not to support it, though the impl. in core.sync doesn't use pthread_rwmutex--it uses a mutex and condition variable under the covers.


More information about the dmd-concurrency mailing list