Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ManagedCountdownLatch

A countdown latch that will signal when the counter reaches zero.

Hierarchy

  • ManagedCountdownLatch

Index

Constructors

constructor

  • Creates a new instance of the Latch with an initial count.

    Parameters

    • initialCount: number

      The count to start the latch at.

    Returns ManagedCountdownLatch

Properties

Private __counter

__counter: AtomicInteger
internal

Private __waitPromise

__waitPromise: Promise<Object>
internal

Methods

decrement

  • decrement(): void
  • Decrements the counter by one and signals if it reaches zero.

    Returns void

getCount

  • getCount(): number
  • Gets the current count on the latch.

    Returns number

getTypeString

  • getTypeString(): string
  • Returns string

waitAsync

  • waitAsync(): Future<Object>
  • Returns a promise that resolves once the counter reaches zero.

    Returns Future<Object>