Remove race condition between assemble and prelude load prints
This commit was merged in pull request #1.
This commit is contained in:
3
emu.js
3
emu.js
@@ -54,10 +54,11 @@ class Emulator {
|
||||
this.print("Assembling kernel ");
|
||||
const dots = setInterval(() => this.print("."), DOT_INTERVAL_MS);
|
||||
this.worker = new Worker('boot.js', { type: 'module' });
|
||||
this.worker.postMessage(this.mem);
|
||||
this.worker.postMessage({ type: "load", mem: this.mem });
|
||||
this.worker.onmessage = (e) => {
|
||||
clearInterval(dots);
|
||||
this.print(" done\n");
|
||||
this.worker.postMessage({ type: "boot" });
|
||||
};
|
||||
|
||||
fetch('prelude.f')
|
||||
|
||||
Reference in New Issue
Block a user