使用头文件相对位置为:boost/interprocess/sync/named_mutex.hpp
在程序中使用
boost::interprocess::named_mutex g_namedmutex(boost::interprocess::open_or_create, "theMutexName");
boost::interprocess::scoped_lock<boost::interprocess::named_mutex> lock(g_namedmutex);
使用头文件相对位置为:boost/interprocess/sync/named_mutex.hpp
在程序中使用
boost::interprocess::named_mutex g_namedmutex(boost::interprocess::open_or_create, "theMutexName");
boost::interprocess::scoped_lock<boost::interprocess::named_mutex> lock(g_namedmutex);
转载于:https://www.cnblogs.com/zhangdewang/p/8615623.html