What is ReaderWriter Locks


What is ReaderWriter Locks ?

✍: Guest


You may want to lock a resource only when data is being written and permit multiple clients to simultaneously read data when data is not being updated. The ReaderWriterLock class enforces exclusive access to a resource while a thread is modifying the resource, but it allows nonexclusive access when reading the resource. ReaderWriter locks are a usefulalternative to exclusive locks that cause other threads to wait, even when those threads do not need to update data.

2007-10-22, 5028👍, 0💬