Lines Matching full:schedule

44 // Creates a schedule function with event counters.
46 // Usage: `schedule!(s, SCHED, DROP)`
48 // The schedule function `s` does nothing.
51 macro_rules! schedule { macro
81 schedule!(s, SCHEDULE, DROP_S); in drop_and_detach()
85 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in drop_and_detach()
91 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in drop_and_detach()
97 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in drop_and_detach()
105 schedule!(s, SCHEDULE, DROP_S); in detach_and_drop()
110 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in detach_and_drop()
116 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in detach_and_drop()
124 schedule!(s, SCHEDULE, DROP_S); in detach_and_run()
129 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in detach_and_run()
135 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in detach_and_run()
143 schedule!(s, SCHEDULE, DROP_S); in run_and_detach()
148 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in run_and_detach()
154 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in run_and_detach()
162 schedule!(s, SCHEDULE, DROP_S); in cancel_and_run()
167 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in cancel_and_run()
173 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in cancel_and_run()
181 schedule!(s, SCHEDULE, DROP_S); in run_and_cancel()
186 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in run_and_cancel()
192 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in run_and_cancel()
200 schedule!(s, SCHEDULE, DROP_S); in cancel_join()
205 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in cancel_join()
211 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in cancel_join()
217 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in cancel_join()
223 assert_eq!(SCHEDULE.load(Ordering::SeqCst), 0); in cancel_join()
229 fn schedule() { in schedule() function
231 let schedule = move |runnable| s.send(runnable).unwrap(); in schedule() localVariable
232 let (runnable, _task) = async_task::spawn(future::poll_fn(|_| Poll::<()>::Pending), schedule); in schedule()
235 runnable.schedule(); in schedule()
239 runnable.schedule(); in schedule()
243 runnable.schedule(); in schedule()
253 let schedule = move |runnable: Runnable| { in schedule_counter() localVariable
257 let (runnable, _task) = async_task::spawn(future::poll_fn(|_| Poll::<()>::Pending), schedule); in schedule_counter()
258 runnable.schedule(); in schedule_counter()
260 r.recv().unwrap().schedule(); in schedule_counter()
261 r.recv().unwrap().schedule(); in schedule_counter()
281 runnable.schedule(); in drop_inside_schedule()
287 let schedule = move |runnable| s.send(runnable).unwrap(); in waker() localVariable
288 let (runnable, _task) = async_task::spawn(future::poll_fn(|_| Poll::<()>::Pending), schedule); in waker()