A mutex or a semaphore
You need to allow at most five concurrent calls to a fragile external service, from any number of threads.
Which primitive, and why?
You need to allow at most five concurrent calls to a fragile external service, from any number of threads.
Which primitive, and why?