Semaphore and synchronization

Viewed 2681

I could not quite understand the following from the semaphore description in javadocs.

Note that no synchronization lock is held when acquire() is called as that would prevent an item from being returned to the pool. The semaphore encapsulates the synchronization needed to restrict access to the pool, separately from any synchronization needed to maintain the consistency of the pool itself.

Can someone please help me understand this and its implications.

1 Answers
Related