3 ms·
I know what you mean; semaphores seem to crop up as a synchronization primitive everyone's supposed to learn about, but they are not so proportionately necessar
by sk5t 12y ago
I know what you mean; semaphores seem to crop up as a synchronization primitive everyone's supposed to learn about, but they are not so proportionately necessary in applications.
That said, they are useful to manage concurrency in a finer-grained way than setting up and tearing down thread pools for short durations. E.g., imagine you have a pool of 100 cached threads and want to apportion no more than 5 of these to any one client.