@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
17 lines • 917 B
TypeScript
/** Join the operation or its epoch abort, releasing late results without publishing them. */
export declare function runAdmissionProducer<T>(signal: AbortSignal, produce: () => Promise<T>, release: (value: T) => Promise<void>): Promise<T>;
export type ProducerLosses = {
abandoned: number;
releaseFailed: number;
};
/** Abandoned producers and failed late releases are leak signals: counted and logged, never silent. */
export declare function recordProducerLoss(losses: ProducerLosses, kind: keyof ProducerLosses, count: number, cause?: unknown): void;
/** One deadline per ending epoch, shared by all its bounded producers and duplicate teardown calls. */
export declare class AdmissionProducerLifetime {
private readonly controller;
readonly signal: AbortSignal;
private timer;
end(abandoned: () => void): void;
close(): void;
}
//# sourceMappingURL=compact-admission-producer.d.ts.map