2017-01-29 22:41:26 +00:00
|
|
|
import { Pool } from './smartipc.classes.pool';
|
2017-01-29 19:50:36 +00:00
|
|
|
export declare let setWorkerBasePath: (basePathArg: string) => void;
|
|
|
|
export declare class Thread {
|
|
|
|
thread: any;
|
2017-01-29 22:41:26 +00:00
|
|
|
workerPath: string;
|
|
|
|
running: boolean;
|
|
|
|
assignedPool: Pool;
|
2017-01-29 19:50:36 +00:00
|
|
|
constructor(filePathArg: string);
|
|
|
|
/**
|
|
|
|
* sends a message to the spawned process
|
|
|
|
*/
|
|
|
|
send<T>(message: any): Promise<T>;
|
|
|
|
kill(): void;
|
2017-01-29 22:41:26 +00:00
|
|
|
assignToPool(poolArg: Pool): void;
|
|
|
|
private checkSpawn();
|
2017-01-29 19:50:36 +00:00
|
|
|
}
|