Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2004-07-05 16:43:39

Howard Hinnant wrote:
> I'm not following that x==y always holds. If two threads concurrently
> hold a read lock, and concurrently try to obtain a write lock, only
> one thread will get the write lock, the other will block. Assuming
> the one thread that got the write lock changes x, then the thread
> that blocked
> will fire its assert when it finally unblocks and gets the write lock.
> What am I missing?

As I understand it, if two threads hold a read lock, no thread can obtain a
write lock. Write lock == exclusive access. This corresponds to the POSIX
memory model where write accesses must be exclusive, but read accesses can
be shared with other read accesses. But I may be wrong. ;-)

Boost list run by bdawes at, gregod at, cpdaniel at, john at