Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Semaphore

Semaphore

since

5.15.0

Hierarchy

Index

Constructors

Methods

Constructors

constructor

  • Parameters

    • count: number

    Returns Semaphore

Methods

acquire

  • acquire(): Promise<ReleaseFunction>
  • Returns Promise<ReleaseFunction>

use

  • use<T>(f: () => Promise<T>): Promise<T>
  • Type parameters

    • T

    Parameters

    • f: () => Promise<T>
        • (): Promise<T>
        • Returns Promise<T>

    Returns Promise<T>