ch22: examples

This commit is contained in:
Luciano Ramalho
2021-02-28 21:19:40 -03:00
parent d2bcf655d7
commit a751c86836
10 changed files with 107 additions and 74 deletions

View File

@@ -40,8 +40,8 @@ def download_many(cc_list: list[str],
with futures.ThreadPoolExecutor(max_workers=concur_req) as executor: # <6>
to_do_map = {} # <7>
for cc in sorted(cc_list): # <8>
future = executor.submit(download_one,
cc, base_url, verbose) # <9>
future = executor.submit(download_one, cc,
base_url, verbose) # <9>
to_do_map[future] = cc # <10>
done_iter = futures.as_completed(to_do_map) # <11>
if not verbose: