export interface CorkableQueue<TResult, TAbortController extends AbortController> {
    readonly corked: boolean;
    readonly pause: typeof pause;
    run(task: Task<TResult, TAbortController['signal']>): Promise<TResult>;
    cancel(task: Task<TResult, TAbortController['signal']>): void;
    cork(): void;
    uncork(): void;
}
interface AbortController {
    readonly signal: AbortSignal;
    abort(): void;
}
interface AbortSignal {
    readonly aborted: boolean;
}
type Task<TResult, TAbortSignal extends AbortSignal> = (signal: TAbortSignal) => Promise<TResult | typeof pause>;
declare const pause: unique symbol;
export declare function makeCorkableQueue<TResult, TAbortController extends AbortController>(options: {
    makeAbortController(): TAbortController;
}): CorkableQueue<TResult, TAbortController>;
export {};
