-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathIPosisKernel.d.ts
32 lines (28 loc) · 1.08 KB
/
IPosisKernel.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
declare interface IPosisKernel extends IPosisExtension {
/**
* beings running a process
* @param imageName registered image for the process constructor
* @param startContext context for a process
*/
startProcess(imageName: string, startContext: any): { pid: PosisPID; process: IPosisProcess } | undefined;
/**
* killProcess also kills all children of this process
* note to the wise: probably absorb any calls to this that would wipe out your entire process tree.
* @param pid
*/
killProcess(pid: PosisPID): void;
/**
* gets the instance of a running process
* @param pid
* @returns process instance or undefined if the pid is invalid
*/
getProcessById(pid: PosisPID): IPosisProcess | undefined;
/**
* passing undefined as parentId means "make me a root process"
* i.e. one that will not be killed if another process is killed
* @param pid
* @param parentId
* @returns `true` if process was successfully reparented
*/
setParent(pid: PosisPID, parentId?: PosisPID): boolean;
}