monitor.hpp: use std::shared_mutex