MCPcopy
hub / github.com/fluentpython/example-code-2e / main

Function main

19-concurrency/primes/spinner_prime_async_broken.py:33–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31# end::SPINNER_ASYNC_EXPERIMENT[]
32
33def main() -> None:
34 n = 5_000_111_000_222_021
35 result = asyncio.run(supervisor(n))
36 msg = 'is' if result else 'is not'
37 print(f'{n:,} {msg} prime')
38
39if __name__ == '__main__':
40 main()

Callers 1

Calls 2

supervisorFunction · 0.70
runMethod · 0.45

Tested by

no test coverage detected