/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Licensed under the Apache License, Version 2.0. See LICENSE file in the project root for details. ***************************************************************************** */ import { CancellationToken } from "./cancellation"; import { Cancelable } from "@esfx/cancelable"; /** * Asynchronously notifies one or more waiting Promises that an event has occurred. */ export declare class Pulsar { private _waiters; /** * Notifies the next waiter. */ pulse(): void; /** * Notifies all waiters. */ pulseAll(): void; /** * Asynchronously waits for the the next pulse. * * @param token A CancellationToken used to cancel the request. */ wait(token?: CancellationToken | Cancelable): Promise; }