Clean up thread-local data for the current thread. This triggers __del__ on objects stored in thread-local variables.
()
| 596 | /// Clean up thread-local data for the current thread. |
| 597 | /// This triggers __del__ on objects stored in thread-local variables. |
| 598 | fn cleanup_thread_local_data() { |
| 599 | // Take all guards - this will trigger LocalGuard::drop for each, |
| 600 | // which removes the thread's dict from each Local instance |
| 601 | LOCAL_GUARDS.with(|guards| { |
| 602 | guards.borrow_mut().clear(); |
| 603 | }); |
| 604 | } |
| 605 | |
| 606 | #[cfg(all(not(target_arch = "wasm32"), feature = "host_env"))] |
| 607 | #[pyfunction] |
no test coverage detected