Aller au contenu principal

Semaphore

Index

Constructors

Accessors

Methods

Constructors

constructor

Accessors

remaining

  • get remaining(): number
  • Returns number

running

  • get running(): number
  • Returns number

Methods

acquire

  • acquire(): Promise<() => void>
  • Returns Promise<() => void>

run

  • run<T>(fn: () => T | Promise<T>): Promise<T>
  • Type parameters

    • T

    Parameters

    • fn: () => T | Promise<T>

    Returns Promise<T>