Skip to content
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 src/python_spy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,12 @@ impl PythonSpy {
} else {
for thread in self.process.threads()?.iter() {
let threadid: Tid = thread.id()?;
thread_activity.insert(threadid, thread.active()?);
let Ok(active) = thread.active() else {
// Do not fail all sampling if a single thread died between entering the loop
// and reading its status.
continue;
};
thread_activity.insert(threadid, active);
}
}

Expand Down
Loading