随笔分类 -  [92] 读书笔记

《C++代码设计与重用》 书评
摘要:作者:唐风 主页:www.cnblogs.com/liyiwen 前几个星期买了,一直没有直接细翻,买的时候看了背面的两个推荐,一个是孟岩,一个是Scott Meyers(Effective C++系列的作者)。二牛推荐必属精品,于是没有细读,直接买下。 这次去往返合肥,不想带什么行李,包里就只装了这本书,于是在火车上花时间翻了一遍。这才确认,原来这本书居然成书于1995年……那... 阅读全文

posted @ 2013-09-21 00:18 唐风思琪 阅读(1478) 评论(4) 推荐(0)

《C++ concurrency in action》 读书笔记 -- Part 3 第四章 线程的同步
摘要:唐风 www.cnblogs.com/liyiwen 《C++ concurreny in action》 第四章 Synchronizing concurrent operations 这一章主要讲C++11中的进行线程同步的方法 4.1 Waiting for an event or other condition 经常遇到的一种场景是一个线程A需要等待另一个线程B完成一些“事”(操作)才能往下运行继续处理。 有以下几种“办法” 一,设置一个多个线程都能访问到的变量,B线程一旦完成自己的操作,就把这个全局的变量设为某个值,而线程A则 不断地去检查变量的值是不是已经设置为这个... 阅读全文

posted @ 2013-04-22 22:12 唐风思琪 阅读(2347) 评论(0) 推荐(0)

《C++ concurrency in action》 读书笔记 -- Part 2 第三章 线程间的数据共享
摘要:唐风 www.cnblogs.com/liyiwen 《C++ concurreny in action》 第三章 sharing data between threads 3.1 线程间共享数据的“问题” invariants 被破坏(比如说一个读一个写) 3.1.1 race conditions 条件竞争是: In concurrency, a race condition is anything where the outcome depends on the relative ordering of execution of operations on two o... 阅读全文

posted @ 2013-04-17 23:43 唐风思琪 阅读(2643) 评论(0) 推荐(1)

《C++ concurrency in action》 读书笔记 -- Part 1
摘要:第一章 Why use concurrency,There are two main reasons to use concurrency in an application: separation of con-cerns and performance.(这句写得很精辟:) 我:分离实现逻辑,然后使用“状态迁移表”这种消息驱动的方式,用在APP的设计上非常的方便。 什么时候不要使用con... 阅读全文

posted @ 2013-04-15 23:18 唐风思琪 阅读(2949) 评论(0) 推荐(0)

导航