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

Function waitForReadable

Platforms/emscripten/web_example_pyrepl_jspi/src.mjs:107–120  ·  view source on GitHub ↗
(timeout)

Source from the content-addressed store, hash-verified

105}
106
107async function waitForReadable(timeout) {
108 let p1, p2, p3;
109 let h1, h2, h3;
110 try {
111 [p1, h1] = onReadable();
112 [p2, h2] = onTimeout(timeout);
113 [p3, h3] = onSignal();
114 return await Promise.race([p1, p2, p3]);
115 } finally {
116 h1.dispose();
117 h2.dispose();
118 h3.dispose();
119 }
120}
121
122const FIONREAD = 0x541b;
123

Callers 2

readAsyncFunction · 0.85
pollAsyncFunction · 0.85

Calls 4

onReadableFunction · 0.85
onTimeoutFunction · 0.85
onSignalFunction · 0.85
raceMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…