Lines Matching refs:Arc
8 use std::sync::Arc;
117 let waiter = Arc::new(Waiter::new( in wait()
141 let waiter = Arc::new(Waiter::new( in wait_read()
160 fn add_waiter(&self, waiter: Arc<Waiter>, raw_mutex: &RawMutex) { in add_waiter()
449 use std::sync::Arc;
465 fn wake_by_ref(_arc_self: &Arc<Self>) {} in wake_by_ref()
477 let mu = Arc::new(Mutex::new(())); in notify_one()
478 let cv = Arc::new(Condvar::new()); in notify_one()
497 let mu = Arc::new(Mutex::new(false)); in multi_mutex()
498 let cv = Arc::new(Condvar::new()); in multi_mutex()
524 let alt_mu = Arc::new(Mutex::new(None)); in multi_mutex()
579 async fn notify(mu: Arc<Mutex<()>>, cv: Arc<Condvar>) { in notify_one_multi_thread_async()
584 async fn wait(mu: Arc<Mutex<()>>, cv: Arc<Condvar>, tx: Sender<()>, pool: ThreadPool) { in notify_one_multi_thread_async()
585 let mu2 = Arc::clone(&mu); in notify_one_multi_thread_async()
586 let cv2 = Arc::clone(&cv); in notify_one_multi_thread_async()
599 let mu = Arc::new(Mutex::new(())); in notify_one_multi_thread_async()
600 let cv = Arc::new(Condvar::new()); in notify_one_multi_thread_async()
615 async fn observe(mu: &Arc<Mutex<usize>>, cv: &Arc<Condvar>) { in notify_one_with_cancel()
623 async fn decrement(mu: &Arc<Mutex<usize>>, cv: &Arc<Condvar>) { in notify_one_with_cancel()
631 async fn increment(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>, done: Sender<()>) { in notify_one_with_cancel()
641 mu: Arc<Mutex<usize>>, in notify_one_with_cancel()
642 cv: Arc<Condvar>, in notify_one_with_cancel()
643 alt_mu: Arc<Mutex<usize>>, in notify_one_with_cancel()
644 alt_cv: Arc<Condvar>, in notify_one_with_cancel()
658 mu: Arc<Mutex<usize>>, in notify_one_with_cancel()
659 cv: Arc<Condvar>, in notify_one_with_cancel()
660 alt_mu: Arc<Mutex<usize>>, in notify_one_with_cancel()
661 alt_cv: Arc<Condvar>, in notify_one_with_cancel()
676 let mu = Arc::new(Mutex::new(0usize)); in notify_one_with_cancel()
677 let alt_mu = Arc::new(Mutex::new(0usize)); in notify_one_with_cancel()
679 let cv = Arc::new(Condvar::new()); in notify_one_with_cancel()
680 let alt_cv = Arc::new(Condvar::new()); in notify_one_with_cancel()
685 Arc::clone(&mu), in notify_one_with_cancel()
686 Arc::clone(&cv), in notify_one_with_cancel()
687 Arc::clone(&alt_mu), in notify_one_with_cancel()
688 Arc::clone(&alt_cv), in notify_one_with_cancel()
695 Arc::clone(&mu), in notify_one_with_cancel()
696 Arc::clone(&cv), in notify_one_with_cancel()
697 Arc::clone(&alt_mu), in notify_one_with_cancel()
698 Arc::clone(&alt_cv), in notify_one_with_cancel()
703 ex.spawn_ok(increment(Arc::clone(&mu), Arc::clone(&cv), tx.clone())); in notify_one_with_cancel()
704 ex.spawn_ok(increment(Arc::clone(&alt_mu), Arc::clone(&alt_cv), tx)); in notify_one_with_cancel()
725 async fn decrement(mu: &Arc<Mutex<usize>>, cv: &Arc<Condvar>) { in notify_all_with_cancel()
733 async fn increment(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>, done: Sender<()>) { in notify_all_with_cancel()
743 mu: Arc<Mutex<usize>>, in notify_all_with_cancel()
744 cv: Arc<Condvar>, in notify_all_with_cancel()
745 alt_mu: Arc<Mutex<usize>>, in notify_all_with_cancel()
746 alt_cv: Arc<Condvar>, in notify_all_with_cancel()
761 let mu = Arc::new(Mutex::new(0usize)); in notify_all_with_cancel()
762 let alt_mu = Arc::new(Mutex::new(0usize)); in notify_all_with_cancel()
764 let cv = Arc::new(Condvar::new()); in notify_all_with_cancel()
765 let alt_cv = Arc::new(Condvar::new()); in notify_all_with_cancel()
770 Arc::clone(&mu), in notify_all_with_cancel()
771 Arc::clone(&cv), in notify_all_with_cancel()
772 Arc::clone(&alt_mu), in notify_all_with_cancel()
773 Arc::clone(&alt_cv), in notify_all_with_cancel()
778 ex.spawn_ok(increment(Arc::clone(&mu), Arc::clone(&cv), tx.clone())); in notify_all_with_cancel()
779 ex.spawn_ok(increment(Arc::clone(&alt_mu), Arc::clone(&alt_cv), tx)); in notify_all_with_cancel()
798 let mu = Arc::new(Mutex::new(0)); in notify_all()
799 let cv = Arc::new(Condvar::new()); in notify_all()
879 async fn reset(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in notify_all_multi_thread_async()
886 mu: Arc<Mutex<usize>>, in notify_all_multi_thread_async()
887 cv: Arc<Condvar>, in notify_all_multi_thread_async()
906 let mu = Arc::new(Mutex::new(0)); in notify_all_multi_thread_async()
907 let cv = Arc::new(Condvar::new()); in notify_all_multi_thread_async()
922 async fn read(mu: Arc<Mutex<bool>>, cv: Arc<Condvar>) { in wake_all_readers()
929 let mu = Arc::new(Mutex::new(false)); in wake_all_readers()
930 let cv = Arc::new(Condvar::new()); in wake_all_readers()
938 let arc_waker = Arc::new(TestWaker); in wake_all_readers()
968 async fn dec(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in cancel_before_notify()
978 let mu = Arc::new(Mutex::new(0)); in cancel_before_notify()
979 let cv = Arc::new(Condvar::new()); in cancel_before_notify()
981 let arc_waker = Arc::new(TestWaker); in cancel_before_notify()
1013 async fn dec(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in cancel_after_notify_one()
1023 let mu = Arc::new(Mutex::new(0)); in cancel_after_notify_one()
1024 let cv = Arc::new(Condvar::new()); in cancel_after_notify_one()
1026 let arc_waker = Arc::new(TestWaker); in cancel_after_notify_one()
1057 async fn dec(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in cancel_after_notify_all()
1067 let mu = Arc::new(Mutex::new(0)); in cancel_after_notify_all()
1068 let cv = Arc::new(Condvar::new()); in cancel_after_notify_all()
1070 let arc_waker = Arc::new(TestWaker); in cancel_after_notify_all()
1106 mu: Arc<Mutex<usize>>, in timed_wait()
1107 cv: Arc<Condvar>, in timed_wait()
1132 let mu = Arc::new(Mutex::new(0)); in timed_wait()
1133 let cv = Arc::new(Condvar::new()); in timed_wait()
1135 let arc_waker = Arc::new(TestWaker); in timed_wait()