Skip to content

Commit

Permalink
👌 IMPROVE: Add Process.is_killing property (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjsewell authored Jan 28, 2021
1 parent 848028b commit 33f4e9f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plumpy/processes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,12 @@ def kill(self, msg: Union[str, None] = None) -> Union[bool, asyncio.Future]:
self.transition_to(process_states.ProcessState.KILLED, msg)
return True

# endregion
@property
def is_killing(self) -> bool:
"""Return if the process is already being killed."""
return self._killing is not None

# endregion

def create_initial_state(self) -> process_states.State:
"""This method is here to override its superclass.
Expand Down

0 comments on commit 33f4e9f

Please sign in to comment.