Skip to content

Commit

Permalink
Limit worker number (close #162)
Browse files Browse the repository at this point in the history
  • Loading branch information
AcidWeb committed Oct 5, 2020
1 parent c817e23 commit 3faa736
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CB/Core.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ def bulk_check_checksum_callback(self, result):
self.checksumCache[result[0]] = result[1]

def bulk_check_checksum(self, addons, pbar):
with Pool() as pool:
with Pool(processes=min(60, os.cpu_count() or 1)) as pool:
workers = []
for addon in addons:
w = pool.apply_async(self.check_checksum, (addon, ), callback=self.bulk_check_checksum_callback)
Expand Down

0 comments on commit 3faa736

Please sign in to comment.