摘要:
超赞的线程安全的初始化
static plsa::PLSAModel& model()
{
static plsa::PLSAModel _model = ([&]() { plsa::PLSAModel _model;
string modelPath = "./data/plsa.model/pzw.idx";
PSCONF(modelPath, "PlsaTopic");
_model.L... 阅读全文
摘要:
测试环境gcc4.8.2 iterator find ( const key_type& k );
const_iterator find ( const key_type& k ) const; Unordered_map有两个对应的find函数 我推断第二个是安全的,第一个经过实测不是线程安全 auto iter = _map.find(key)
在openmp多线程环境... 阅读全文