Acquire a read lock, blocking until a read lock is available. Multiple readers can concurrently hold the read lock.
If there's a writer, or a waiting writer, increment the waiting reader count and block on this. Otherwise increment the active reader count and return. Caller must call releaseRead when done (for example, in a finally block).
|
|
|
|