Lines Matching refs:Arc
9 use std::sync::Arc;
68 fn new_waiter(raw: &RawMutex) -> Arc<Waiter>; in new_waiter()
92 fn new_waiter(raw: &RawMutex) -> Arc<Waiter> { in new_waiter()
93 Arc::new(Waiter::new( in new_waiter()
123 fn new_waiter(raw: &RawMutex) -> Arc<Waiter> { in new_waiter()
124 Arc::new(Waiter::new( in new_waiter()
890 use std::sync::Arc;
909 fn wake_by_ref(_arc_self: &Arc<Self>) {} in wake_by_ref()
992 let arc = Arc::new(Mutex::new(mu)); in arc_nested()
1004 let arc = Arc::new(Mutex::new(1)); in arc_access_in_unwind()
1008 i: Arc<Mutex<i32>>, in arc_access_in_unwind()
1042 let mu = Arc::new(Mutex::new(0usize)); in high_contention()
1065 async fn increment(mu: Arc<Mutex<usize>>, alt_mu: Arc<Mutex<usize>>, tx: Sender<()>) { in high_contention_with_cancel()
1077 let mu = Arc::new(Mutex::new(0usize)); in high_contention_with_cancel()
1078 let alt_mu = Arc::new(Mutex::new(0usize)); in high_contention_with_cancel()
1082 ex.spawn_ok(increment(Arc::clone(&mu), Arc::clone(&alt_mu), tx.clone())); in high_contention_with_cancel()
1133 async fn increment(mu: Arc<Mutex<usize>>, tx: Sender<()>) { in multi_thread_async()
1142 let mu = Arc::new(Mutex::new(0usize)); in multi_thread_async()
1145 ex.spawn_ok(increment(Arc::clone(&mu), tx.clone())); in multi_thread_async()
1172 struct NeedsDrop(Arc<AtomicUsize>); in into_inner_drop()
1179 let value = Arc::new(AtomicUsize::new(0)); in into_inner_drop()
1196 let mu = Arc::new(Mutex::new(0isize)); in rw_arc()
1239 waker: Arc<SpinLock<Option<Waker>>>, in rw_single_thread_async()
1256 fn wake_future(waker: Arc<SpinLock<Option<Waker>>>) { in rw_single_thread_async()
1274 let waker = Arc::new(SpinLock::new(None)); in rw_single_thread_async()
1275 let waker2 = Arc::clone(&waker); in rw_single_thread_async()
1316 async fn writer(mu: Arc<Mutex<isize>>, tx: Sender<()>) { in rw_multi_thread_async()
1329 async fn reader(mu: Arc<Mutex<isize>>, tx: Sender<()>) { in rw_multi_thread_async()
1340 let mu = Arc::new(Mutex::new(0isize)); in rw_multi_thread_async()
1344 ex.spawn_ok(writer(Arc::clone(&mu), txw)); in rw_multi_thread_async()
1348 ex.spawn_ok(reader(Arc::clone(&mu), txr.clone())); in rw_multi_thread_async()
1367 async fn read(mu: Arc<Mutex<()>>) { in wake_all_readers()
1373 async fn write(mu: Arc<Mutex<()>>) { in wake_all_readers()
1377 let mu = Arc::new(Mutex::new(())); in wake_all_readers()
1387 let arc_waker = Arc::new(TestWaker); in wake_all_readers()
1457 async fn tight_loop(mu: Arc<Mutex<bool>>) { in long_wait()
1467 async fn mark_ready(mu: Arc<Mutex<bool>>) { in long_wait()
1471 let mu = Arc::new(Mutex::new(false)); in long_wait()
1475 let arc_waker = Arc::new(TestWaker); in long_wait()
1515 async fn tight_loop(mu: Arc<Mutex<bool>>) { in cancel_long_wait_before_wake()
1525 async fn mark_ready(mu: Arc<Mutex<bool>>) { in cancel_long_wait_before_wake()
1529 let mu = Arc::new(Mutex::new(false)); in cancel_long_wait_before_wake()
1533 let arc_waker = Arc::new(TestWaker); in cancel_long_wait_before_wake()
1562 async fn tight_loop(mu: Arc<Mutex<bool>>) { in cancel_long_wait_after_wake()
1572 async fn mark_ready(mu: Arc<Mutex<bool>>) { in cancel_long_wait_after_wake()
1576 let mu = Arc::new(Mutex::new(false)); in cancel_long_wait_after_wake()
1580 let arc_waker = Arc::new(TestWaker); in cancel_long_wait_after_wake()
1621 async fn inc(mu: Arc<Mutex<usize>>) { in designated_waker()
1625 let mu = Arc::new(Mutex::new(0)); in designated_waker()
1633 let arc_waker = Arc::new(TestWaker); in designated_waker()
1695 async fn inc(mu: Arc<Mutex<usize>>) { in cancel_designated_waker()
1699 let mu = Arc::new(Mutex::new(0)); in cancel_designated_waker()
1703 let arc_waker = Arc::new(TestWaker); in cancel_designated_waker()
1724 async fn inc(mu: Arc<Mutex<usize>>) { in cancel_before_wake()
1728 let mu = Arc::new(Mutex::new(0)); in cancel_before_wake()
1734 let arc_waker = Arc::new(TestWaker); in cancel_before_wake()
1787 async fn inc(mu: Arc<Mutex<usize>>) { in cancel_after_wake()
1791 let mu = Arc::new(Mutex::new(0)); in cancel_after_wake()
1797 let arc_waker = Arc::new(TestWaker); in cancel_after_wake()
1849 async fn timed_lock(timer: oneshot::Receiver<()>, mu: Arc<Mutex<()>>) { in timeout()
1861 let mu = Arc::new(Mutex::new(())); in timeout()
1866 let arc_waker = Arc::new(TestWaker); in timeout()
1901 async fn read_zero(mu: Arc<Mutex<usize>>) { in writer_waiting()
1908 async fn inc(mu: Arc<Mutex<usize>>) { in writer_waiting()
1912 async fn read_one(mu: Arc<Mutex<usize>>) { in writer_waiting()
1918 let mu = Arc::new(Mutex::new(0)); in writer_waiting()
1926 let arc_waker = Arc::new(TestWaker); in writer_waiting()
1976 async fn read(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in notify_one()
1983 async fn write(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in notify_one()
1992 let mu = Arc::new(Mutex::new(0)); in notify_one()
1993 let cv = Arc::new(Condvar::new()); in notify_one()
1995 let arc_waker = Arc::new(TestWaker); in notify_one()
2064 async fn dec(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in notify_when_unlocked()
2074 let mu = Arc::new(Mutex::new(0)); in notify_when_unlocked()
2075 let cv = Arc::new(Condvar::new()); in notify_when_unlocked()
2077 let arc_waker = Arc::new(TestWaker); in notify_when_unlocked()
2110 async fn read(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in notify_reader_writer()
2121 async fn write(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in notify_reader_writer()
2130 async fn lock(mu: Arc<Mutex<usize>>) { in notify_reader_writer()
2134 let mu = Arc::new(Mutex::new(0)); in notify_reader_writer()
2135 let cv = Arc::new(Condvar::new()); in notify_reader_writer()
2137 let arc_waker = Arc::new(TestWaker); in notify_reader_writer()
2228 async fn read(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in notify_readers_with_read_lock()
2238 let mu = Arc::new(Mutex::new(0)); in notify_readers_with_read_lock()
2239 let cv = Arc::new(Condvar::new()); in notify_readers_with_read_lock()
2241 let arc_waker = Arc::new(TestWaker); in notify_readers_with_read_lock()