Class SemaphoreImpl

  • All Implemented Interfaces:
    Semaphore

    public class SemaphoreImpl
    extends Object
    implements Semaphore
    Implements a simple semaphore.
    Author:
    Dave Bristor, Marina Vatkina
    • Constructor Detail

      • SemaphoreImpl

        public SemaphoreImpl​(String owner)
    • Method Detail

      • acquire

        public void acquire()
        Acquire a lock.
        Specified by:
        acquire in interface Semaphore
      • release

        public void release()
        Release a lock.
        Specified by:
        release in interface Semaphore