How to use the @esfx/async-manualresetevent.AsyncManualResetEvent function in @esfx/async-manualresetevent

To help you get started, we’ve selected a few @esfx/async-manualresetevent examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github esfx / esfx / packages / async-countdown / src / index.ts View on Github external
constructor(initialCount: number) {
        if (!isNumber(initialCount)) throw new TypeError("Number expected: initialCount.");
        if ((initialCount |= 0) < 0) throw new RangeError("Argument out of range: initialCount.");

        this._initialCount = initialCount;
        this._remainingCount = initialCount;
        this._event = new AsyncManualResetEvent(initialCount === 0);
    }

@esfx/async-manualresetevent

Provides 'AsyncManualResetEvent', an async coordination primitive.

Apache-2.0
Latest version published 2 years ago

Package Health Score

48 / 100
Full package analysis

Popular @esfx/async-manualresetevent functions

Similar packages