模板std::mutex用法:

std::mutex mymutex;
std::lock_guard<std::mutex> lock(mymutex);
原文地址:https://www.cnblogs.com/swordenchanter/p/9989387.html