Skip to content

Commit

Permalink
Update sky/utils/subprocess_utils.py
Browse files Browse the repository at this point in the history
Co-authored-by: Zhanghao Wu <[email protected]>
  • Loading branch information
aylei and Michaelvll authored Dec 21, 2024
1 parent 4619413 commit 9bb757e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sky/utils/subprocess_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def run_in_parallel(func: Callable,
return []
# Short-circuit for single element
if len(args) == 1:
return [func(next(iter(args)))]
return [func(args[0])]
# Reference: https://stackoverflow.com/questions/25790279/python-multiprocessing-early-termination # pylint: disable=line-too-long
processes = num_threads if num_threads is not None else get_parallel_threads(
)
Expand Down

0 comments on commit 9bb757e

Please sign in to comment.