Accessing a Readers/Writer lock
The readers/writer lock provides three member functions to lock and unlock a resource: rdlock, wrlock, and unlock. A thread can lock another thread for reading or writing as many times as it likes, provided that the correct number of unlocks are performed. It is an error, however, to lock a resource for reading and writing at the same time. Once a thread has a reader lock, the thread cannot convert that reader lock to a writer lock without unlocking the reader lock first.
Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.