MCPcopy
hub / github.com/encode/starlette / __call__

Method __call__

starlette/background.py:19–23  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17 self.is_async = is_async_callable(func)
18
19 async def __call__(self) -> None:
20 if self.is_async:
21 await self.func(*self.args, **self.kwargs)
22 else:
23 await run_in_threadpool(self.func, *self.args, **self.kwargs)
24
25
26class BackgroundTasks(BackgroundTask):

Callers

nothing calls this directly

Calls 1

run_in_threadpoolFunction · 0.90

Tested by

no test coverage detected