blob: 5b96c9034bf2a6f5278c90297d45d00b4e12ef2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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");
|