Class AdjustableSemaphore

java.lang.Object
io.temporal.internal.worker.AdjustableSemaphore

@ThreadSafe public final class AdjustableSemaphore extends Object
A simple implementation of an adjustable semaphore.
  • Constructor Details

    • AdjustableSemaphore

      public AdjustableSemaphore(int initialPermits)
      Create a new adjustable semaphore with the given number of initial permits.
      Parameters:
      initialPermits - the initial number of permits, must be at least 1