Hi, igniters!

As IgniteSemaphore's javadoc states,

    "Distributed semaphore provides functionality similar to {@code

At the same time method semantics of current implementation is inverted,
i.e. acquire() decrements internal semaphore count and release() increments
count. Then newlyCreatedSemaphore.acquire() call blocks until some other
thread calls release(), and it looks confusing.Also, availablePermits()
returns permits acquired so far, that is, semaphore count.

Another difference is unbounded nature of IgniteSemaphore implementation,
while java.util.concurrent.Semaphore is bounded.

I think we are to do one of the following:

- Document uncommon IgniteSemaphore semantics properly


- Change its semantics to conform java.util.concurrent counterpart.


Best regards,

  Andrey Kuznetsov.

Reply via email to