MCPcopy Index your code
hub / github.com/python/cpython / prompt

Method prompt

Platforms/emscripten/web_example/python.worker.mjs:12–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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) {

Callers 1

StdinBufferClass · 0.95

Calls 2

storeMethod · 0.45
waitMethod · 0.45

Tested by

no test coverage detected