I am reading the book Java Concurrency in Practice. In a section about java.util.concurrent.Semaphore, the below lines are present in the book. It is a comment abou
java.util.concurrent.Semaphore
Can somebody explain this ? From the above statement, it looks like the "permits" can keep growing.
A semaphore is a counter of permits. acquire is like decrement which waits rather than go below zero. It has no upper limit.
Why is it designed this way ?
Because its simple to do so.