https://image2.slideserve.com/4302963/implementing-condition-variables1-t.jpg