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

Method _serve

Lib/multiprocessing/resource_sharer.py:133–150  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

131 self._thread = t
132
133 def _serve(self):
134 if hasattr(signal, 'pthread_sigmask'):
135 signal.pthread_sigmask(signal.SIG_BLOCK, signal.valid_signals())
136 while 1:
137 try:
138 with self._listener.accept() as conn:
139 msg = conn.recv()
140 if msg is None:
141 break
142 key, destination_pid = msg
143 send, close = self._cache.pop(key)
144 try:
145 send(conn, destination_pid)
146 finally:
147 close()
148 except:
149 if not util.is_exiting():
150 sys.excepthook(*sys.exc_info())
151
152
153_resource_sharer = _ResourceSharer()

Callers

nothing calls this directly

Calls 6

hasattrFunction · 0.85
sendFunction · 0.85
closeFunction · 0.50
acceptMethod · 0.45
recvMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected