MCPcopy
hub / github.com/xpf0000/FlyEnv / constructor

Method constructor

src/main/core/ForkManager.ts:88–106  ·  view source on GitHub ↗
(file: string, autoDestroy: boolean)

Source from the content-addressed store, hash-verified

86 }
87
88 constructor(file: string, autoDestroy: boolean) {
89 this.forkFile = file
90 this.autoDestroy = autoDestroy
91 this.callback = {}
92
93 this.onMessage = this.onMessage.bind(this)
94 this.onError = this.onError.bind(this)
95 this.onExit = this.onExit.bind(this)
96 this.onSpawn = this.onSpawn.bind(this)
97
98 this.loading = true
99 const child = utilityProcess.fork(file)
100 child.postMessage({ Server: JSON.parse(JSON.stringify(Server)) })
101 child.on('message', this.onMessage)
102 child.on('error', this.onError)
103 child.on('exit', this.onExit)
104 child.on('spawn', this.onSpawn)
105 this.child = child
106 }
107
108 isChildDisabled() {
109 if (this.loading) {

Callers

nothing calls this directly

Calls 2

parseMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected