Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Not A Problem
-
2.1
-
None
-
None
Description
Current semaphore implementation, GridCacheSemaphoreImpl, has inverted method semantics: acquire() releases the permit and release() acquires it. Also, debug-level method availablePermits() returns permits acquired so far. This confusing behaviour should be fixed.
Also, it's worth noting in IgniteSemaphore's javadoc its unbounded nature, as opposed to java.util.concurrent.Semaphore.