会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
米**饭
2014年6月17日
boost::thread boost库线程
摘要: 一.boost::thread的创建 1.线程创建方法一: boost::shared_ptr writeThread_; boost::function0 f = boost::bind(&DBTaskMgr::execute, this); writeThread_ = bo...
阅读全文
posted @ 2014-06-17 20:09 米**饭
阅读(363)
评论(0)
推荐(0)
boost::thread 线程锁
摘要: 1.boost锁的概述: boost库中提供了mutex类与lock类,通过组合可以轻易的构建读写锁与互斥锁。2.mutex对象类(主要有两种): 1.boost::mutex(独占互斥类) -->有lock和unlock方法 2.boost::shared_mutex(共享互斥类) -->有...
阅读全文
posted @ 2014-06-17 16:49 米**饭
阅读(687)
评论(0)
推荐(0)
C++ 引用(&)
摘要: #include void sort(int &a, int &b){ if (a>=b) { return; } if (a<b) { int temp = a; a = b; b = temp; }}int main(int arg...
阅读全文
posted @ 2014-06-17 14:35 米**饭
阅读(233)
评论(0)
推荐(0)
导航
博客园
首页
新随笔
联系
订阅
管理
公告