reorganizing asyncio examples

This commit is contained in:
Luciano Ramalho 2020-02-19 22:13:46 -03:00
parent 0ca34e2676
commit 06f18c3765
22 changed files with 1 additions and 3 deletions

View File

@ -90,10 +90,8 @@ async def downloader_coro(cc_list, base_url, verbose, concur_req): # <1>
def download_many(cc_list, base_url, verbose, concur_req):
loop = asyncio.get_event_loop()
coro = downloader_coro(cc_list, base_url, verbose, concur_req)
counts = loop.run_until_complete(coro) # <14>
loop.close() # <15>
counts = asyncio.run(coro) # <14>
return counts