Skip to content

Commit

Permalink
bugfix: do not endless loop if futures == desired
Browse files Browse the repository at this point in the history
  • Loading branch information
wumpus committed Aug 7, 2020
1 parent a60a009 commit acbb9d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion paramsurvey/psmultiprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def map(func, psets, out_func=None, user_kwargs=None, chdir=None, outfile=None,
pset_index = 0

while True:
while system_kwargs['outstanding'] < cores * factor:
while system_kwargs['outstanding'] <= cores * factor:
with stats.record_wallclock('get_pset_group', obj=system_stats):
pset_group, pset_index = utils.get_pset_group(psets, pset_index, group_size)
if len(pset_group) == 0:
Expand Down
2 changes: 1 addition & 1 deletion paramsurvey/psray.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def map(func, psets, out_func=None, user_kwargs=None, chdir=None, outfile=None,
pset_index = 0

while True:
while len(futures) < cores * factor:
while len(futures) <= cores * factor:
with stats.record_wallclock('get_pset_group', obj=system_stats):
pset_group, pset_index = utils.get_pset_group(psets, pset_index, group_size)
if len(pset_group) == 0:
Expand Down

0 comments on commit acbb9d3

Please sign in to comment.