MCPcopy
hub / github.com/urllib3/urllib3 / _start_server

Function _start_server

dummyserver/hypercornserver.py:82–100  ·  dummyserver/hypercornserver.py::_start_server
(
    config: Config,
    app: QuartTrio,
    shutdown_event: trio.Event,
    *,
    task_status: anyio.abc.TaskStatus[list[str]] = anyio.TASK_STATUS_IGNORED,
)

Source from the content-addressed store, hash-verified

80
81
82async def _start_server(
83 config: Config,
84 app: QuartTrio,
85 shutdown_event: trio.Event,
86 *,
87 task_status: anyio.abc.TaskStatus[list[str]] = anyio.TASK_STATUS_IGNORED,
88) -> None:
89 async with trio.open_nursery() as nursery:
90 with trio.fail_after(5):
91 config_bind: list[str]
92 config_bind = await nursery.start(
93 functools.partial(
94 hypercorn.trio.serve,
95 app,
96 config,
97 shutdown_trigger=shutdown_event.wait,
98 )
99 )
100 task_status.started(config_bind)
101
102
103@contextlib.contextmanager

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected