More condition_variable refactions