MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / slow

Function slow

19-concurrency/spinner_async_experiment.py:22–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20
21# tag::SPINNER_ASYNC_EXPERIMENT[]
22async def slow() -> int:
23 time.sleep(3) # <4>
24 return 42
25
26async def supervisor() -> int:
27 spinner = asyncio.create_task(spin('thinking!')) # <1>

Callers 1

supervisorFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected