Skip to content

Commit

Permalink
cierro pool de threads
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis Wolfsdorf committed Oct 8, 2019
1 parent 72cd384 commit f5c863f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pydatajson/threading_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@

def apply_threading(l, function, cant_threads):
pool = ThreadPool(processes=cant_threads)

return pool.map(function, l)
results = pool.map(function, l)
pool.close()
pool.join()
return results

0 comments on commit f5c863f

Please sign in to comment.