The QReadWriteLock class, part of the Qt framework, provides read-write locking.
A read-write lock is a synchronization tool for protecting resources that can be accessed for reading and writing. This type of lock is useful if you want to allow multiple threads to have simultaneous read-only access, but as soon as one thread wants to write to the resource, all other threads must be blocked until the writing is complete.
The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.