Improve event emitter

This commit is contained in:
Olivier Gagnon
2021-09-18 15:44:39 -04:00
parent 4b6a6300f5
commit 61e3959a25
15 changed files with 46 additions and 61 deletions
+2 -2
View File
@@ -45,7 +45,7 @@ export function prestigeWorkerScripts() {
killWorkerScript(ws);
}
WorkerScriptStartStopEventEmitter.emitEvent();
WorkerScriptStartStopEventEmitter.emit();
workerScripts.clear();
}
@@ -501,7 +501,7 @@ export function createAndAddWorkerScript(runningScriptObj, server, parent) {
// Add the WorkerScript to the global pool
workerScripts.set(pid, s);
WorkerScriptStartStopEventEmitter.emitEvent();
WorkerScriptStartStopEventEmitter.emit();
// Start the script's execution
let p = null; // Script's resulting promise