pub struct ServiceWaker(/* private fields */);Expand description
Wakes whichever thread services requests, so it does not have to poll for them.
The server cannot know how to wake its embedder, and the embedder’s event
loop does not exist yet when the server starts, so the callback is installed
later. A OnceLock rather than a lock because it is written exactly once
and read on the path of every request.
Without one installed the embedder must poll, which is what the Blitz shell used to do on a 10ms timer: 100 wakeups a second while idle, up to 10ms of latency on every command, and enough of both to show up in any measurement taken with the driver attached.
Implementations§
Trait Implementations§
Source§impl Clone for ServiceWaker
impl Clone for ServiceWaker
Source§fn clone(&self) -> ServiceWaker
fn clone(&self) -> ServiceWaker
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ServiceWaker
impl Debug for ServiceWaker
Source§impl Default for ServiceWaker
impl Default for ServiceWaker
Source§fn default() -> ServiceWaker
fn default() -> ServiceWaker
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for ServiceWaker
impl !UnwindSafe for ServiceWaker
impl Freeze for ServiceWaker
impl Send for ServiceWaker
impl Sync for ServiceWaker
impl Unpin for ServiceWaker
impl UnsafeUnpin for ServiceWaker
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