Formatting fix. Used std::mutex and std::condition_variable_any for monitor.