Lines Matching refs:task
1 use crate::runtime::task::{self, Schedule, Task};
10 let _ = task::joinable::<_, Runtime>(async { unreachable!() }); in create_drop()
16 let (task, _) = task::joinable(async { in schedule()
17 crate::task::yield_now().await; in schedule()
20 rt.schedule(task); in schedule()
29 let (task, _) = task::joinable(async { in shutdown()
31 crate::task::yield_now().await; in shutdown()
35 rt.schedule(task); in shutdown()
54 released: task::TransferStack::new(), in with()
69 released: task::TransferStack<Runtime>,
74 queue: VecDeque<task::Notified<Runtime>>,
89 let task = self.next_task(); in tick_max() localVariable
91 task.run(); in tick_max()
103 fn next_task(&self) -> task::Notified<Runtime> { in next_task()
110 for task in core.tasks.iter() { in shutdown()
111 task.shutdown(); in shutdown()
114 while let Some(task) = core.queue.pop_back() { in shutdown()
115 task.shutdown(); in shutdown()
130 for task in self.released.drain() { in maintenance()
131 let task = ManuallyDrop::new(task); in maintenance() localVariable
135 let ptr = task.header().into(); in maintenance()
143 fn bind(task: Task<Self>) -> Runtime { in bind()
145 rt.0.core.try_lock().unwrap().tasks.push_front(task); in bind()
149 fn release(&self, task: &Task<Self>) -> Option<Task<Self>> { in release()
151 let task = unsafe { Task::from_raw(task.header().into()) }; in release() localVariable
152 self.0.released.push(task); in release()
156 fn schedule(&self, task: task::Notified<Self>) { in schedule()
157 self.0.core.try_lock().unwrap().queue.push_back(task); in schedule()