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);

posted @ 2018-03-21 10:44  在左手  阅读(716)  评论(0编辑  收藏  举报