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

Function run_in_threadpool

starlette/concurrency.py:32–34  ·  view source on GitHub ↗
(func: Callable[P, T], *args: P.args, **kwargs: P.kwargs)

Source from the content-addressed store, hash-verified

30
31
32async def run_in_threadpool(func: Callable[P, T], *args: P.args, **kwargs: P.kwargs) -> T:
33 func = functools.partial(func, *args, **kwargs)
34 return await anyio.to_thread.run_sync(func)
35
36
37class _StopIteration(Exception):

Callers 8

__call__Method · 0.90
wrapped_appFunction · 0.90
dispatchMethod · 0.90
writeMethod · 0.90
readMethod · 0.90
seekMethod · 0.90
closeMethod · 0.90
__call__Method · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected