MCPcopy Create free account
hub / github.com/Dispatcharr/Dispatcharr / wait

Method wait

apps/proxy/live_proxy/utils.py:191–207  ·  view source on GitHub ↗
(self, timeout=None)

Source from the content-addressed store, hash-verified

189 return self.returncode
190
191 def wait(self, timeout=None):
192 if self.returncode is not None:
193 return self.returncode
194 import gevent as _gevent
195 deadline = time.monotonic() + timeout if timeout is not None else None
196 while True:
197 try:
198 rpid, status = os.waitpid(self.pid, os.WNOHANG)
199 except ChildProcessError:
200 self.returncode = -1
201 return self.returncode
202 if rpid:
203 self._reap(status)
204 return self.returncode
205 if deadline is not None and time.monotonic() >= deadline:
206 raise subprocess.TimeoutExpired(self.pid, timeout)
207 _gevent.sleep(0.01)
208
209 def kill(self):
210 try:

Callers 7

_renew_loopMethod · 0.45
workerMethod · 0.45
fetch_streamFunction · 0.45
stream_endpointMethod · 0.45
run_recordingFunction · 0.45

Calls 1

_reapMethod · 0.95

Tested by 2

workerMethod · 0.36