pub(crate) struct BlockingSchedule {
hooks: TaskHarnessScheduleHooks,
}
Expand description
task::Schedule
implementation that does nothing (except some bookkeeping
in test-util builds). This is unique to the blocking scheduler as tasks
scheduled are not really futures but blocking operations.
We avoid storing the task by forgetting it in bind
and re-materializing it
in release
.
Fields§
§hooks: TaskHarnessScheduleHooks
Implementations§
Trait Implementations§
source§impl Schedule for BlockingSchedule
impl Schedule for BlockingSchedule
source§fn release(&self, _task: &Task<Self>) -> Option<Task<Self>>
fn release(&self, _task: &Task<Self>) -> Option<Task<Self>>
The task has completed work and is ready to be released. The scheduler
should release it immediately and return it. The task module will batch
the ref-dec with setting other options. Read more
fn hooks(&self) -> TaskHarnessScheduleHooks
source§fn yield_now(&self, task: Notified<Self>)
fn yield_now(&self, task: Notified<Self>)
Schedule the task to run in the near future, yielding the thread to
other tasks.
source§fn unhandled_panic(&self)
fn unhandled_panic(&self)
Polling the task resulted in a panic. Should the runtime shutdown?
Auto Trait Implementations§
impl Freeze for BlockingSchedule
impl !RefUnwindSafe for BlockingSchedule
impl Send for BlockingSchedule
impl Sync for BlockingSchedule
impl Unpin for BlockingSchedule
impl !UnwindSafe for BlockingSchedule
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