import type { EventBus, Listener } from '../event-bus/EventBus';
import type { AnyExecutionContext } from '../execution-context/ExecutionContext';
import type { AnyNamedTask } from '../task/Types';
export declare enum ThreadEventType {
    Bound = "bound",
    Started = "started",
    Finished = "finished",
    Aborted = "aborted"
}
export type ThreadEvent = {
    taskName: string;
    context: AnyExecutionContext;
    param: unknown;
    task: AnyNamedTask;
};
export declare class ThreadEventBus {
    protected readonly eventBus: EventBus<ThreadEventType, ThreadEvent>;
    private unsubscribes;
    constructor(eventBus: EventBus<ThreadEventType, ThreadEvent>);
    attach(type: ThreadEventType, listener: Listener<ThreadEvent>): () => void;
    disposeEventBus(): void;
}
