gecko-dev/dom/promise/tests/test_webassembly_compile_wo...

14 строки
283 B
JavaScript

const sampleURL = "test_webassembly_compile_sample.wasm";
function spawnWork() {
const N = 50;
var arr = [];
for (var i = 0; i < N; i++) {
arr.push(WebAssembly.compileStreaming(fetch(sampleURL)));
}
Promise.all(arr).then(spawnWork);
}
spawnWork();
postMessage("ok");