A condition is used by one thread to signal to other threads that something they were waiting for
has happened. If a single thread was waiting for a condition, it can wake up and proceed with its
execution. If several threads were waiting, they can all wake up and compete for the resource for
which they were waiting.
• wait/synch/mutex
A mutual exclusion object used to permit access to a resource (such as a section of executable
codę) while preventing other threads from accessing the resource.
• wait/synch/rwlock
A read/write lock object used to lock a specific variable for access while preventing its use by other
threads. A shared read lock can be acquired simultaneously by multiple threads. Anexclusive
write lock can be acguired by only one thread at a time.