Simplify local::mutex by using a condition_variable