()
| 10 | } |
| 11 | |
| 12 | prompt() { |
| 13 | this.readIndex = 1; |
| 14 | Atomics.store(this.buffer, 0, -1); |
| 15 | postMessage({ |
| 16 | type: "stdin", |
| 17 | buffer: this.sab, |
| 18 | }); |
| 19 | Atomics.wait(this.buffer, 0, -1); |
| 20 | this.numberOfCharacters = this.buffer[0]; |
| 21 | } |
| 22 | |
| 23 | stdin = () => { |
| 24 | while (this.numberOfCharacters + 1 === this.readIndex) { |
no test coverage detected