Skip to content

Commit fcb4373

Browse files
authored
Merge pull request #100 from celenium-io/lumina-upd
Lumina upd
2 parents bb94051 + 855b9c1 commit fcb4373

File tree

14 files changed

+13322
-2668
lines changed

14 files changed

+13322
-2668
lines changed

assets/workers/worker.js

Lines changed: 4 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,7 @@
1-
import init, { run_worker } from "@/services/lumina-node-wasm/index.js"
1+
import { NodeWorker } from "@/services/lumina-node-wasm/lumina_node_wasm"
22

3-
async function worker_main() {
4-
let queued = []
5-
if (typeof SharedWorkerGlobalScope !== "undefined" && self instanceof SharedWorkerGlobalScope) {
6-
onconnect = (event) => {
7-
queued.push(event)
8-
}
9-
} else {
10-
onmessage = (event) => {
11-
queued.push(event)
12-
}
13-
}
3+
Error.stackTraceLimit = 99
144

15-
await init()
16-
await run_worker(queued)
17-
}
5+
const worker = new NodeWorker(self)
186

19-
if (typeof WorkerGlobalScope !== "undefined" && self instanceof WorkerGlobalScope) {
20-
Error.stackTraceLimit = 99
21-
worker_main()
22-
}
7+
worker.run()

0 commit comments

Comments
 (0)