boost中全局命名锁的使用

使用头文件相对位置为: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