/**
 * Work-Stealing Worker Pool
 *
 * High-performance worker pool using Chase-Lev work-stealing deques.
 * - Each worker has its own deque
 * - Workers steal from each other when idle
 * - LIFO for owner (cache locality)
 * - FIFO for thieves (fairness)
 *
 * Target: 90%+ CPU utilization, 2-3x throughput
 */
import { WorkItem } from "./work-stealing-deque.js";
import { TaskPriority } from "../agents/concurrency.js";
type WorkExecutor<T> = (item: WorkItem<T>) => Promise<void>;
/**
 * Work-Stealing Worker Pool
 */
export declare class WorkStealingWorkerPool<T> {
    private workers;
    private workerIds;
    private executor;
    private running;
    private workerPromises;
    private workerLoops;
    private minWaitMs;
    private maxWaitMs;
    private currentWaitMs;
    private stats;
    constructor(workerCount: number, executor: WorkExecutor<T>);
    /**
     * Start the worker pool
     */
    start(): void;
    /**
     * Submit work to the pool
     * @param item - Work item to execute
     * @param priority - Task priority
     * @param targetWorker - Optional specific worker (for affinity)
     */
    submit(item: T, priority?: TaskPriority, targetWorker?: string): void;
    /**
     * Worker loop - executes tasks and steals when idle
     */
    private workerLoop;
    /**
     * Try to steal work from other workers
     */
    private trySteal;
    /**
     * Adaptive waiting when idle
     * Exponential backoff: 1ms -> 100ms
     */
    private adaptiveWait;
    /**
     * Get least loaded worker
     */
    private getLeastLoadedWorker;
    /**
     * Stop the worker pool
     */
    stop(): Promise<void>;
    /**
     * Get pool statistics
     */
    getStats(): {
        workers: number;
        totalExecuted: number;
        totalStolen: number;
        stealRate: number;
        utilizationPercent: number;
        queuedTasks: number;
    };
    /**
     * Get total queued tasks across all workers
     */
    getQueuedCount(): number;
}
export {};
