diff --git a/include/engine/datafacade/shared_datafacade.hpp b/include/engine/datafacade/shared_datafacade.hpp index c35391300..3fff40cee 100644 --- a/include/engine/datafacade/shared_datafacade.hpp +++ b/include/engine/datafacade/shared_datafacade.hpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include namespace osrm { @@ -260,7 +260,7 @@ template class SharedDataFacade final : public BaseDataFacade< { // Get exclusive lock util::SimpleLogger().Write(logDEBUG) << "Updates available, getting exclusive lock"; - boost::unique_lock lock(data_mutex); + const boost::lock_guard lock(data_mutex); if (CURRENT_LAYOUT != data_timestamp_ptr->layout || CURRENT_DATA != data_timestamp_ptr->data)