Skip to content

Commit 212ec11

Browse files
committed
add some more helpers for process state
1 parent 293e05b commit 212ec11

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/process.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,18 @@ impl PyProcessState {
359359
Self(state)
360360
}
361361

362+
fn is_alive(&self) -> bool {
363+
self.0.is_alive()
364+
}
365+
366+
fn is_dead(&self) -> bool {
367+
self.0.is_dead()
368+
}
369+
370+
fn is_unknown(&self) -> bool {
371+
self.0.is_unknown()
372+
}
373+
362374
fn __repr__(&self) -> String {
363375
match self.0 {
364376
ProcessState::Unknown => "ProcessState(alive=False)".to_owned(),

0 commit comments

Comments
 (0)