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

Function onTimeout

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

Source from the content-addressed store, hash-verified

88}
89
90function onTimeout(timeout) {
91 var id;
92 var promise = new Promise((resolve) => {
93 if (timeout > 0) {
94 id = setTimeout(resolve, timeout, waitResult.TIMEOUT);
95 }
96 });
97 var handle = {
98 dispose() {
99 if (id) {
100 clearTimeout(id);
101 }
102 },
103 };
104 return [promise, handle];
105}
106
107async function waitForReadable(timeout) {
108 let p1, p2, p3;

Callers 1

waitForReadableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…