Reverted map, added chunksize

pull/39/head
Piero Toffanin 2016-10-26 18:16:08 -04:00
rodzic c198813fa9
commit cc6945996c
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

@ -60,8 +60,7 @@ def process_pending_tasks():
if tasks.count() > 0:
pool = ThreadPool(tasks.count())
for task in tasks:
pool.apply_async(process, args=(task, ))
pool.map(process, tasks, chunksize=1)
pool.close()
pool.join()