pub struct WakeSource { /* private fields */ }Expand description
Releases a runtime owner thread parked in RuntimeHandle::pump.
Signalling and destruction are callable from any thread. Each source holds its own reference to the runtime’s wake state, so it stays usable after the runtime closes, where signalling does nothing.
Implementations§
Source§impl WakeSource
impl WakeSource
Sourcepub fn signal(&self) -> Result<()>
pub fn signal(&self) -> Result<()>
Sets the runtime’s wake flag and releases the parked owner thread.
A signal raised while the owner thread is running sets the wake flag,
so the next RuntimeHandle::pump returns without parking. Signalling
after the runtime closes succeeds and does nothing.
Trait Implementations§
Source§impl Debug for WakeSource
impl Debug for WakeSource
Auto Trait Implementations§
impl Freeze for WakeSource
impl RefUnwindSafe for WakeSource
impl Send for WakeSource
impl Sync for WakeSource
impl Unpin for WakeSource
impl UnsafeUnpin for WakeSource
impl UnwindSafe for WakeSource
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