The Little Book of SEMAPHORES (2nd Edition): The Ins and Outs of Concurrency Control and Common Mistakes

Category: Computer Science
Author: Allen B. Downey
5.0

Comments

by anonymous   2018-05-21
You can use a `Semaphore` as a substitute for a `Lock`, but that doesn't mean that a semaphore is a kind of lock. Semaphores are abstract objects that you can use in [a variety of different ways](https://www.amazon.com/Little-Book-SEMAPHORES-2nd-Concurrency/dp/1441418687) to coordinate the activities of two or more different threads. In some useful semaphore-based patterns, the semaphore permits will be released in one thread and acquired in another.