import { IDisposable } from "../Interfaces/IDisposable";
/**
 * Helper class to push actions to a pool of workers.
 */
export declare class WorkerPool implements IDisposable {
    private _workerInfos?;
    private _pendingActions?;
    /**
     * Constructor
     * @param workers Array of workers to use for actions
     */
    constructor(workers: Array<Worker>);
    /**
     * Terminates all workers and clears any pending actions.
     */
    dispose(): void;
    /**
     * Pushes an action to the worker pool. If all the workers are active, the action will be
     * pended until a worker has completed its action.
     * @param action The action to perform. Call onComplete when the action is complete.
     */
    push(action: (worker: Worker, onComplete: () => void) => void): void;
    private _execute;
}
