(script)
| 73 | |
| 74 | var agent = { |
| 75 | start(script) { |
| 76 | if (i32a === null) { |
| 77 | i32a = new Int32Array(new SharedArrayBuffer(256)); |
| 78 | } |
| 79 | var w = new Worker(workerScript(script), {type: 'string'}); |
| 80 | w.index = workers.length; |
| 81 | w.postMessage({kind: 'start', i32a: i32a, index: w.index}); |
| 82 | workers.push(w); |
| 83 | }, |
| 84 | |
| 85 | broadcast(sab, id) { |
| 86 | if (!(sab instanceof SharedArrayBuffer)) { |
nothing calls this directly
no test coverage detected