import { MasterControlForWorker } from "../mainEngine";
import { IBatchMainMessage, IWorkerMessage } from "../types";
import { IMainThreadInitOption, MainThreadEngineImpl } from "./base";
import { SnapshotThreadImpl } from "./snapshotThread";
export interface MainThreadManager {
    master: MasterControlForWorker;
    mainThreadMap: Map<string, MainThreadEngineImpl>;
    createMainThread(viewId: string, opt: IMainThreadInitOption): MainThreadEngineImpl;
    consume(msg: Set<IWorkerMessage>): Promise<void>;
    post(sp: Omit<IBatchMainMessage, "render">): void;
    destroy(): void;
}
export declare class MainThreadManagerImpl implements MainThreadManager {
    mainThreadMap: Map<string, MainThreadEngineImpl>;
    private snapshotThread?;
    master: MasterControlForWorker;
    constructor(master: MasterControlForWorker);
    post(msg: Omit<IBatchMainMessage, "render">): void;
    destroy(): void;
    createMainThread(viewId: string, opt: IMainThreadInitOption): MainThreadEngineImpl;
    createSnapshotThread(viewId: string, opt: IMainThreadInitOption): SnapshotThreadImpl;
    consume(msg: Set<IWorkerMessage>): Promise<void>;
}
