I\'m going to use boost::mutex from boost/thread/mutex.hpp. There are several ways to lock/unlock mutex: with scoped_lock, uniqu
boost::mutex
boost/thread/mutex.hpp
scoped_lock
uniqu
you can use
std::lock_guard lock(mutex);
if don't want to use boost library.