(&self)
| 687 | /// Mirrors `_Py_ThreadCanHandleSignals`. |
| 688 | #[allow(dead_code)] |
| 689 | pub(crate) fn is_main_thread(&self) -> bool { |
| 690 | #[cfg(feature = "threading")] |
| 691 | { |
| 692 | crate::stdlib::_thread::get_ident() == self.state.main_thread_ident.load() |
| 693 | } |
| 694 | #[cfg(not(feature = "threading"))] |
| 695 | { |
| 696 | true |
| 697 | } |
| 698 | } |
| 699 | |
| 700 | /// Create a new `VirtualMachine` structure. |
| 701 | pub(crate) fn new(ctx: PyRc<Context>, state: PyRc<PyGlobalState>) -> Self { |
no test coverage detected