Lock the reader/writer lock for write. The call will block until all active read locks or active/pending write locks are released. When the reader/writer lock is locked for write, all read/write lock attempts will either fail or block until the lock is released. Use unlock to release the lock.