MCPcopy Index your code
hub / github.com/RustPython/RustPython / _Runner

Class _Runner

crates/wasm/Lib/asyncweb.py:30–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29
30class _Runner:
31 def __init__(self, coro):
32 self._send = coro.send
33 self._throw = coro.throw
34 # start the coro
35 self.success(None)
36
37 def _run(self, send, arg):
38 try:
39 ret = send(arg)
40 except StopIteration:
41 return
42 ret.then(self.success, self.error)
43
44 def success(self, res):
45 self._run(self._send, res)
46
47 def error(self, err):
48 self._run(self._throw, err)
49
50
51def main(async_func):

Callers 1

runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected