Skip to content

Commit 06f18c3

Browse files
committed
reorganizing asyncio examples
1 parent 0ca34e2 commit 06f18c3

22 files changed

+1
-3
lines changed
File renamed without changes.
File renamed without changes.

17-futures-py3.7/countries/flags2_asyncio.py renamed to 20-futures-py3.7/countries/flags2_asyncio.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,8 @@ async def downloader_coro(cc_list, base_url, verbose, concur_req): # <1>
9090

9191

9292
def download_many(cc_list, base_url, verbose, concur_req):
93-
loop = asyncio.get_event_loop()
9493
coro = downloader_coro(cc_list, base_url, verbose, concur_req)
95-
counts = loop.run_until_complete(coro) # <14>
96-
loop.close() # <15>
94+
counts = asyncio.run(coro) # <14>
9795

9896
return counts
9997

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)