摘要: 先看官方介绍: 在下面这段代码中: 线程先用unique_lock独占锁获取mutex互斥锁(构造函数自动获取,见下图用法3),然后在使用cv.wait()(cv是事前定义好的Condition_variable对象)时,会阻塞线程并自动释放持有的锁,见下下图,但是在其他线程使用cv.notify_ 阅读全文
posted @ 2017-05-17 22:10 blackwall 阅读(195) 评论(0) 推荐(0) 编辑
摘要: 最近在linux上使用Clion这个C++ IDE,感觉很好,JetBrain的产品都很不错。 但是在跑简单例子的时候,使用到thread对象,直接build会出错 报错是: thread::thread<void (&)(int), int>(void (&)(int), int&&)’:pthr 阅读全文
posted @ 2017-05-17 21:40 blackwall 阅读(1893) 评论(0) 推荐(1) 编辑
摘要: 安装完最新的Boost库 官方说明中有一句话: Finally, will leave Boost binaries in the lib/ subdirectory of your installation prefix. You will also find a copy of the Boos 阅读全文
posted @ 2017-05-17 21:18 blackwall 阅读(769) 评论(0) 推荐(0) 编辑