1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
use crate::task::{Schedule, ScheduleSendOnly, Task}; /// `task::Schedule` implementation that does nothing. This is unique to the /// blocking scheduler as tasks scheduled are not really futures but blocking /// operations. pub(super) struct NoopSchedule; impl Schedule for NoopSchedule { fn bind(&self, _task: &Task<Self>) {} fn release(&self, _task: Task<Self>) {} fn release_local(&self, _task: &Task<Self>) {} fn schedule(&self, _task: Task<Self>) { unreachable!(); } } impl ScheduleSendOnly for NoopSchedule {}