Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👌 IMPROVE: Add Process.is_killing property #199

Merged
merged 1 commit into from
Jan 28, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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