MCPcopy
hub / github.com/pyodide/pyodide / _serve

Function _serve

src/tests/test_python_socket.py:34–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32 ready = threading.Event()
33
34 def _serve():
35 ready.set()
36 try:
37 conn, addr = server_socket.accept()
38 try:
39 handler(conn, addr)
40 finally:
41 conn.close()
42 except Exception as e:
43 errors.append(str(e))
44 finally:
45 server_socket.close()
46
47 thread = threading.Thread(target=_serve, daemon=True)
48 thread.start()

Callers

nothing calls this directly

Calls 5

handlerFunction · 0.85
setMethod · 0.80
acceptMethod · 0.80
closeMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…