Skip to content

Commit 3dd439d

Browse files
committed
delete unused HangThread struct
1 parent 46a9ccd commit 3dd439d

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

pyo3-ffi/src/pystate.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -80,21 +80,6 @@ pub enum PyGILState_STATE {
8080
PyGILState_UNLOCKED,
8181
}
8282

83-
struct HangThread;
84-
85-
impl Drop for HangThread {
86-
fn drop(&mut self) {
87-
loop {
88-
#[cfg(target_family = "unix")]
89-
unsafe {
90-
libc::pause();
91-
}
92-
#[cfg(not(target_family = "unix"))]
93-
std::thread::sleep(std::time::Duration::from_secs(9_999_999));
94-
}
95-
}
96-
}
97-
9883
// The PyGILState_Ensure function will call pthread_exit during interpreter shutdown,
9984
// which causes undefined behavior. Redirect to the "safe" version that hangs instead,
10085
// as Python 3.14 does.

0 commit comments

Comments
 (0)