摘要: Operating systems often distinguish between counting and binary semaphores. The value of a counting semaphore can range over an unrestricted domain. T 阅读全文
posted @ 2019-10-14 07:43 約束の空 阅读(423) 评论(0) 推荐(0) 编辑
摘要: Condition Variable The Bounded-Buffer problem, also known as the producer-consumer problem, can be easily solved using the semaphore. In C++, there ar 阅读全文
posted @ 2019-10-14 06:09 約束の空 阅读(562) 评论(0) 推荐(0) 编辑
摘要: Condition Variable is a kind Event used for signaling between 2 or more threads. One thread can wait for it to get signaled, while other thread can si 阅读全文
posted @ 2019-10-14 03:33 約束の空 阅读(333) 评论(0) 推荐(0) 编辑
摘要: Race Condition: A situation like this, where several processes access and manipulate the same data concurrently and the outcome of the execution depen 阅读全文
posted @ 2019-10-14 03:18 約束の空 阅读(484) 评论(0) 推荐(0) 编辑
摘要: Constructor C++11 提供了std::thread,std::thread thread_object(callable),callable可以是 1. A function pointer 2. A function object 3. A lambda expression To 阅读全文
posted @ 2019-10-14 00:23 約束の空 阅读(157) 评论(0) 推荐(0) 编辑