Condition Variables
This lesson explores the use of condition variables in Ruby.
We'll cover the following...
Condition Variables
Synchronization mechanisms need more than just mutual exclusion; a general need is to be able to wait for another thread to do something. Condition variables provide mutual exclusion and the ability for threads to wait for a predicate to become true.
Condition variables is always associated with a lock and in case of Ruby that lock is an instance of the Mutex
class. Using condition variables allows us to rid ourselves of writing ...