UNPKG

federer

Version:

Experiments in asynchronous federated learning and decentralized learning

39 lines 1.31 kB
import { Logger } from "winston"; import { ChildProcess } from "./Process"; /** * Keeps track of spawned child processes. */ export declare class ProcessTracker { private readonly logger; /** The child processes that have been spawned by the process tracker. */ private processes; /** * Whether the current process tracker is "spent", meaning that it cannot be * used anymore. */ private spent; private sigintListener; private sigtermListener; private uncaughtExceptionListener; constructor(logger: Logger); private addListeners; /** Send SIGTERM to all child processes. */ killChildProcesses(): void; /** Promise resolving once all children have exited. */ allChildrenExited(): Promise<void>; /** * Removes the registered event listeners. After this method has been called, * the ProcessTracker is "spent": it should not be used anymore. */ removeListeners(): void; /** * Register a child with the ProcessTracker. * * @param child Process representing the child process to track * @param name Name of the process, used for logging */ register(child: ChildProcess, name: string): void; private cleanExit; private checkNotSpent; } //# sourceMappingURL=ProcessTracker.d.ts.map