/**
 * Copyright Microsoft Corporation. All rights reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
import { WorkerHost } from './workerHost';
import { ipc } from '../common';
import type { TestRun } from './tasks';
import type { TestGroup } from './testGroups';
export type EnvByProjectId = Map<string, Record<string, string | undefined>>;
export declare class Dispatcher {
    private _workerSlots;
    private _queue;
    private _workerLimitPerProjectId;
    private _queuedOrRunningHashCount;
    private _finished;
    private _isStopped;
    private _testRun;
    private _extraEnvByProjectId;
    private _producedEnvByProjectId;
    constructor(testRun: TestRun);
    private _findFirstJobToRun;
    private _scheduleJob;
    private _runJobInWorker;
    private _checkFinished;
    private _isWorkerRedundant;
    private _updateCounterForWorkerHash;
    run(testGroups: TestGroup[], extraEnvByProjectId: EnvByProjectId): Promise<void>;
    _createWorker(testGroup: TestGroup, parallelIndex: number, loaderData: ipc.SerializedConfig): WorkerHost;
    producedEnvByProjectId(): EnvByProjectId;
    stop(): Promise<void>;
}
//# sourceMappingURL=dispatcher.d.ts.map