MCPcopy
hub / github.com/encode/uvicorn / create_task

Method create_task

tests/benchmarks/http.py:134–136  ·  tests/benchmarks/http.py::MockLoop.create_task
(self, coroutine: Any)

Source from the content-addressed store, hash-verified

132 self._later: list[MockTimerHandle] = []
133
134 def create_task(self, coroutine: Any) -> Any:
135 self._tasks.insert(0, coroutine)
136 return MockTask()
137
138 def call_later(self, delay: float, callback: Callable[[], None], *args: Any) -> MockTimerHandle:
139 handle = MockTimerHandle(self._later, delay, callback, args)

Callers 13

__call__Method · 0.45
handle_eventsMethod · 0.45
_start_asgi_taskMethod · 0.45
handle_connectMethod · 0.45
handle_connectMethod · 0.45
process_requestMethod · 0.45
startupMethod · 0.45
run_serverFunction · 0.45
test_server_interruptFunction · 0.45
_raw_serverFunction · 0.45
test_sigint_finish_reqFunction · 0.45

Calls 1

MockTaskClass · 0.70

Tested by 5

test_server_interruptFunction · 0.36
_raw_serverFunction · 0.36
test_sigint_finish_reqFunction · 0.36
test_sigint_abort_reqFunction · 0.36