MCPcopy
hub / github.com/benoitc/gunicorn / wait

Method wait

gunicorn/workers/sync.py:32–49  ·  view source on GitHub ↗
(self, timeout)

Source from the content-addressed store, hash-verified

30 self.handle(listener, client, addr)
31
32 def wait(self, timeout):
33 try:
34 self.notify()
35 ret = select.select(self.wait_fds, [], [], timeout)
36 if ret[0]:
37 if self.PIPE[0] in ret[0]:
38 os.read(self.PIPE[0], 1)
39 return ret[0]
40
41 except OSError as e:
42 if e.args[0] == errno.EINTR:
43 return self.sockets
44 if e.args[0] == errno.EBADF:
45 if self.nr < 0:
46 return self.sockets
47 else:
48 raise StopWaiting
49 raise
50
51 def is_parent_alive(self):
52 # If our parent changed then we shut down.

Callers 15

run_for_oneMethod · 0.95
run_for_multipleMethod · 0.95
drainMethod · 0.45
_handle_connectionMethod · 0.45
startupMethod · 0.45
shutdownMethod · 0.45
runMethod · 0.45
_sendMethod · 0.45
_read_exactMethod · 0.45
read_body_chunkMethod · 0.45
gunicorn_serverFunction · 0.45

Calls 2

notifyMethod · 0.45
readMethod · 0.45

Tested by 6

gunicorn_serverFunction · 0.36
cleanup_gunicornFunction · 0.36