bitcoin/bitcoin — pull request #1551 by TheBlueMatt (2012-07-03 02:52:35+00:00)
Title: SHARED_LOCK support and locking test cases.

This adds SHARED_LOCK and TRY_SHARED_LOCK to complement LOCK and TRY_LOCK.
It implements the many-readers, single-writer model where any thread holding a LOCK excludes other threads from a SHARED_LOCK, but many threads can hold a SHARED_LOCK.