@remix_labs/machine-starter 2.2020.0-dev → 2.2023.0-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common.js +7 -12
- package/groovebox_build.js +1 -1
- package/machine-wasm.worker.js +1 -1
- package/package.json +2 -2
package/common.js
CHANGED
|
@@ -2,28 +2,25 @@ import { GROOVEBOX_BUILD } from "./groovebox_build.js";
|
|
|
2
2
|
import { nanoid } from "nanoid";
|
|
3
3
|
|
|
4
4
|
let workers = {};
|
|
5
|
-
let
|
|
5
|
+
let parents = {};
|
|
6
6
|
|
|
7
7
|
function terminateAll() {
|
|
8
8
|
for (let [vmID, worker] of Object.entries(workers)) {
|
|
9
9
|
worker.terminate();
|
|
10
10
|
};
|
|
11
11
|
workers = {};
|
|
12
|
-
|
|
12
|
+
parents = {};
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function terminateVM(vmID) {
|
|
16
16
|
let worker = workers[vmID];
|
|
17
17
|
if (worker) {
|
|
18
|
-
let vmChildren = children[vmID];
|
|
19
18
|
delete workers[vmID];
|
|
20
|
-
delete
|
|
19
|
+
delete parents[vmID];
|
|
21
20
|
worker.terminate();
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
}
|
|
21
|
+
for (let [subID, parentID] of Object.entries(parents)) {
|
|
22
|
+
terminateVM(subID);
|
|
23
|
+
};
|
|
27
24
|
}
|
|
28
25
|
}
|
|
29
26
|
|
|
@@ -111,9 +108,7 @@ async function ffi_vm_start(conn, args) {
|
|
|
111
108
|
config[k] = v;
|
|
112
109
|
}
|
|
113
110
|
config["vmID"] = vm_id;
|
|
114
|
-
|
|
115
|
-
if (!vmChildren) vmChildren = [];
|
|
116
|
-
vmChildren.push(vm_id);
|
|
111
|
+
parents[vm_id] = conn.config.vmID;
|
|
117
112
|
let arg_config = args[0];
|
|
118
113
|
if (arg_config.interceptFFI !== undefined)
|
|
119
114
|
config["interceptFFI"] = arg_config.interceptFFI;
|
package/groovebox_build.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var GROOVEBOX_BUILD = "
|
|
1
|
+
var GROOVEBOX_BUILD = "2160";
|
|
2
2
|
export { GROOVEBOX_BUILD }
|