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

Function check

19-concurrency/primes/spinner_prime_async_nap.py:42–43  ·  view source on GitHub ↗
(n: int)

Source from the content-addressed store, hash-verified

40 print(f'\r{blanks}\r', end='')
41
42async def check(n: int) -> int:
43 return await is_prime(n)
44
45async def supervisor(n: int) -> int:
46 spinner = asyncio.create_task(spin('thinking!'))

Callers 1

supervisorFunction · 0.70

Calls 1

is_primeFunction · 0.70

Tested by

no test coverage detected