[temporary] More reliable issue repro

This commit is contained in:
Ingvar Stepanyan
2020-09-25 16:37:29 +01:00
parent 4c4f05f2e3
commit 11ada77c30
3 changed files with 15 additions and 3 deletions

View File

@@ -4,6 +4,10 @@ import initOxiPNG, { start_worker_thread } from './pkg-parallel';
export type WorkerInit = [WebAssembly.Module, WebAssembly.Memory];
// TODO: remove this line.
// It allows main thread to wait for a Worker to be created just to repro a possible V8 bug.
postMessage(null);
addEventListener(
'message',
async (event) => {