[dmd-concurrency] CSP: Communicating sequential processes
    Sean Kelly 
    sean at invisibleduck.org
       
    Wed Jan 20 08:03:21 PST 2010
    
    
  
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.
    
    
More information about the dmd-concurrency
mailing list