(py: Python)
| 45 | |
| 46 | #[allow(unused)] |
| 47 | fn exit_thread(py: Python) -> PyResult<String> { |
| 48 | #[cfg(unix)] |
| 49 | { |
| 50 | py.allow_threads(|| { |
| 51 | // Emulates PyThread_exit_thread. It can happen during Py_Finalize. |
| 52 | unsafe { libc::pthread_exit(std::ptr::null_mut()) }; |
| 53 | }) |
| 54 | } |
| 55 | #[cfg(not(unix))] |
| 56 | { |
| 57 | let _ = py; |
| 58 | // pthread might not exist on this platform. |
| 59 | Ok(String::new()) |
| 60 | } |
| 61 | } |
nothing calls this directly
no test coverage detected