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

Function supervisor

20-executors/getflags/flags_asyncio.py:37–43  ·  view source on GitHub ↗
(cc_list: list[str])

Source from the content-addressed store, hash-verified

35 return asyncio.run(supervisor(cc_list)) # <2>
36
37async def supervisor(cc_list: list[str]) -> int:
38 async with AsyncClient() as client: # <3>
39 to_do = [download_one(client, cc)
40 for cc in sorted(cc_list)] # <4>
41 res = await asyncio.gather(*to_do) # <5>
42
43 return len(res) # <6>
44
45if __name__ == '__main__':
46 main(download_many)

Callers 1

download_manyFunction · 0.70

Calls 1

download_oneFunction · 0.70

Tested by

no test coverage detected