pub struct GlobalEnv(/* private fields */);Expand description
Global runtime environment for signal handlers.
Implementations§
Source§impl GlobalEnv
impl GlobalEnv
Sourcepub unsafe fn new() -> Self
pub unsafe fn new() -> Self
Initializes global state and installs signal handlers.
§Safety
Must be called in a process that can install SIGUSR1/SIGSEGV handlers.
Sourcepub fn init_thread(self, async_preemption_interval: Duration) -> ThreadEnv
pub fn init_thread(self, async_preemption_interval: Duration) -> ThreadEnv
Initializes per-thread state and starts the async preemption watcher.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GlobalEnv
impl RefUnwindSafe for GlobalEnv
impl Send for GlobalEnv
impl Sync for GlobalEnv
impl Unpin for GlobalEnv
impl UnwindSafe for GlobalEnv
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more