Class SemaphoreImpl

  • All Implemented Interfaces:
    Semaphore

    public class SemaphoreImpl
    extends java.lang.Object
    implements Semaphore
    • Field Detail

      • next_sem_id

        private static long next_sem_id
    • Method Detail

      • reserve

        public void reserve()
        Specified by:
        reserve in interface Semaphore
      • reserve

        public boolean reserve​(long timeout_millis)
        Description copied from interface: Semaphore
        reserve a semaphore subject to timeout
        Specified by:
        reserve in interface Semaphore
        Parameters:
        timeout_millis - time to wait
        Returns:
        true -> semaphore reserved, false -> timeout exceeded
      • release

        public void release()
        Specified by:
        release in interface Semaphore