Skip to content

Commit

Permalink
review applied
Browse files Browse the repository at this point in the history
  • Loading branch information
khsrali committed Dec 10, 2024
1 parent 72df1ed commit 57322cf
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plumpy/process_states.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ def __init__(
super().__init__(process)
assert run_fn is not None
self.run_fn = ensure_coroutine(run_fn)
# We wrap `run_fn` to a coroutine so we can apply await on it,
# even it if it was not a coroutine in the first place.
# This allows the same usage of async and non-async function
# with the await syntax while not changing the program logic.
self.args = args
self.kwargs = kwargs
self._run_handle = None
Expand Down

0 comments on commit 57322cf

Please sign in to comment.