Skip to content

Commit 11a653b

Browse files
committed
Test executor.submit instead of executor.map
1 parent b803e5f commit 11a653b

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

frameioclient/py3_uploader.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def _get_session(self):
2323
return thread_local.session
2424

2525
def _upload_chunk(self, task):
26+
print("Starting next task...")
2627
url = task[0]
2728
chunk = task[1]
2829
session = self._get_session()
@@ -42,6 +43,4 @@ def upload(self):
4243
with concurrent.futures.ThreadPoolExecutor(max_workers=5) as executor:
4344
for i, chunk in enumerate(self._read_chunk(self.file, size)):
4445
task = (upload_urls[i], chunk)
45-
tasks.append(task)
46-
47-
executor.map(self._upload_chunk, tasks)
46+
executor.submit(self._upload_chunk, task)

0 commit comments

Comments
 (0)