Lines Matching refs:Arc
8 use std::sync::Arc;
116 let waiter = Arc::new(Waiter::new( in wait()
140 let waiter = Arc::new(Waiter::new( in wait_read()
159 fn add_waiter(&self, waiter: Arc<Waiter>, raw_mutex: &RawMutex) { in add_waiter()
484 use std::sync::Arc;
500 fn wake_by_ref(_arc_self: &Arc<Self>) {} in wake_by_ref()
512 let mu = Arc::new(Mutex::new(())); in notify_one()
513 let cv = Arc::new(Condvar::new()); in notify_one()
532 let mu = Arc::new(Mutex::new(false)); in multi_mutex()
533 let cv = Arc::new(Condvar::new()); in multi_mutex()
560 let alt_mu = Arc::new(Mutex::new(None)); in multi_mutex()
615 async fn notify(mu: Arc<Mutex<()>>, cv: Arc<Condvar>) { in notify_one_multi_thread_async()
620 async fn wait(mu: Arc<Mutex<()>>, cv: Arc<Condvar>, tx: Sender<()>, pool: ThreadPool) { in notify_one_multi_thread_async()
621 let mu2 = Arc::clone(&mu); in notify_one_multi_thread_async()
622 let cv2 = Arc::clone(&cv); in notify_one_multi_thread_async()
635 let mu = Arc::new(Mutex::new(())); in notify_one_multi_thread_async()
636 let cv = Arc::new(Condvar::new()); in notify_one_multi_thread_async()
651 async fn observe(mu: &Arc<Mutex<usize>>, cv: &Arc<Condvar>) { in notify_one_with_cancel()
659 async fn decrement(mu: &Arc<Mutex<usize>>, cv: &Arc<Condvar>) { in notify_one_with_cancel()
667 async fn increment(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>, done: Sender<()>) { in notify_one_with_cancel()
677 mu: Arc<Mutex<usize>>, in notify_one_with_cancel()
678 cv: Arc<Condvar>, in notify_one_with_cancel()
679 alt_mu: Arc<Mutex<usize>>, in notify_one_with_cancel()
680 alt_cv: Arc<Condvar>, in notify_one_with_cancel()
694 mu: Arc<Mutex<usize>>, in notify_one_with_cancel()
695 cv: Arc<Condvar>, in notify_one_with_cancel()
696 alt_mu: Arc<Mutex<usize>>, in notify_one_with_cancel()
697 alt_cv: Arc<Condvar>, in notify_one_with_cancel()
712 let mu = Arc::new(Mutex::new(0usize)); in notify_one_with_cancel()
713 let alt_mu = Arc::new(Mutex::new(0usize)); in notify_one_with_cancel()
715 let cv = Arc::new(Condvar::new()); in notify_one_with_cancel()
716 let alt_cv = Arc::new(Condvar::new()); in notify_one_with_cancel()
721 Arc::clone(&mu), in notify_one_with_cancel()
722 Arc::clone(&cv), in notify_one_with_cancel()
723 Arc::clone(&alt_mu), in notify_one_with_cancel()
724 Arc::clone(&alt_cv), in notify_one_with_cancel()
731 Arc::clone(&mu), in notify_one_with_cancel()
732 Arc::clone(&cv), in notify_one_with_cancel()
733 Arc::clone(&alt_mu), in notify_one_with_cancel()
734 Arc::clone(&alt_cv), in notify_one_with_cancel()
739 ex.spawn_ok(increment(Arc::clone(&mu), Arc::clone(&cv), tx.clone())); in notify_one_with_cancel()
740 ex.spawn_ok(increment(Arc::clone(&alt_mu), Arc::clone(&alt_cv), tx)); in notify_one_with_cancel()
761 async fn decrement(mu: &Arc<Mutex<usize>>, cv: &Arc<Condvar>) { in notify_all_with_cancel()
769 async fn increment(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>, done: Sender<()>) { in notify_all_with_cancel()
779 mu: Arc<Mutex<usize>>, in notify_all_with_cancel()
780 cv: Arc<Condvar>, in notify_all_with_cancel()
781 alt_mu: Arc<Mutex<usize>>, in notify_all_with_cancel()
782 alt_cv: Arc<Condvar>, in notify_all_with_cancel()
797 let mu = Arc::new(Mutex::new(0usize)); in notify_all_with_cancel()
798 let alt_mu = Arc::new(Mutex::new(0usize)); in notify_all_with_cancel()
800 let cv = Arc::new(Condvar::new()); in notify_all_with_cancel()
801 let alt_cv = Arc::new(Condvar::new()); in notify_all_with_cancel()
806 Arc::clone(&mu), in notify_all_with_cancel()
807 Arc::clone(&cv), in notify_all_with_cancel()
808 Arc::clone(&alt_mu), in notify_all_with_cancel()
809 Arc::clone(&alt_cv), in notify_all_with_cancel()
814 ex.spawn_ok(increment(Arc::clone(&mu), Arc::clone(&cv), tx.clone())); in notify_all_with_cancel()
815 ex.spawn_ok(increment(Arc::clone(&alt_mu), Arc::clone(&alt_cv), tx)); in notify_all_with_cancel()
834 let mu = Arc::new(Mutex::new(0)); in notify_all()
835 let cv = Arc::new(Condvar::new()); in notify_all()
915 async fn reset(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in notify_all_multi_thread_async()
922 mu: Arc<Mutex<usize>>, in notify_all_multi_thread_async()
923 cv: Arc<Condvar>, in notify_all_multi_thread_async()
942 let mu = Arc::new(Mutex::new(0)); in notify_all_multi_thread_async()
943 let cv = Arc::new(Condvar::new()); in notify_all_multi_thread_async()
958 async fn read(mu: Arc<Mutex<bool>>, cv: Arc<Condvar>) { in wake_all_readers()
965 let mu = Arc::new(Mutex::new(false)); in wake_all_readers()
966 let cv = Arc::new(Condvar::new()); in wake_all_readers()
974 let arc_waker = Arc::new(TestWaker); in wake_all_readers()
1004 async fn dec(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in cancel_before_notify()
1014 let mu = Arc::new(Mutex::new(0)); in cancel_before_notify()
1015 let cv = Arc::new(Condvar::new()); in cancel_before_notify()
1017 let arc_waker = Arc::new(TestWaker); in cancel_before_notify()
1049 async fn dec(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in cancel_after_notify()
1059 let mu = Arc::new(Mutex::new(0)); in cancel_after_notify()
1060 let cv = Arc::new(Condvar::new()); in cancel_after_notify()
1062 let arc_waker = Arc::new(TestWaker); in cancel_after_notify()
1093 async fn dec(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in cancel_after_transfer()
1103 let mu = Arc::new(Mutex::new(0)); in cancel_after_transfer()
1104 let cv = Arc::new(Condvar::new()); in cancel_after_transfer()
1106 let arc_waker = Arc::new(TestWaker); in cancel_after_transfer()
1148 async fn dec(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in cancel_after_transfer_and_wake()
1158 let mu = Arc::new(Mutex::new(0)); in cancel_after_transfer_and_wake()
1159 let cv = Arc::new(Condvar::new()); in cancel_after_transfer_and_wake()
1161 let arc_waker = Arc::new(TestWaker); in cancel_after_transfer_and_wake()
1198 mu: Arc<Mutex<usize>>, in timed_wait()
1199 cv: Arc<Condvar>, in timed_wait()
1224 let mu = Arc::new(Mutex::new(0)); in timed_wait()
1225 let cv = Arc::new(Condvar::new()); in timed_wait()
1227 let arc_waker = Arc::new(TestWaker); in timed_wait()