2017年3月6日

关键字:__thread & pthread_key_t

摘要: 在说__thread之前,先来看看pthread_ket_t吧。 参考:http://blog.csdn.net/lmh12506/article/details/8452700 上面的博文说的比较通俗易懂。线程私有数据可以理解为线程内的全局变量。在线程内可以被所有函数访问,但是不能被其他线程的函数 阅读全文

posted @ 2017-03-06 13:11 -TTSJ 阅读(1646) 评论(0) 推荐(0) 编辑

2017年3月4日

关键字:for_each

摘要: std::for_each 先贴cppreference中对for_each的概述: 1) Applies the given function object f to the result of dereferencing every iterator in the range [first, l 阅读全文

posted @ 2017-03-04 23:09 -TTSJ 阅读(296) 评论(0) 推荐(0) 编辑

导航