use ConditionVariable#wait