ch22: examples
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user