• Home
  • Raw
  • Download

Lines Matching refs:Arc

9 use std::sync::Arc;
70 fn new_waiter(raw: &RawMutex) -> Arc<Waiter>; in new_waiter()
94 fn new_waiter(raw: &RawMutex) -> Arc<Waiter> { in new_waiter()
95 Arc::new(Waiter::new( in new_waiter()
125 fn new_waiter(raw: &RawMutex) -> Arc<Waiter> { in new_waiter()
126 Arc::new(Waiter::new( in new_waiter()
1013 use std::sync::Arc;
1032 fn wake_by_ref(_arc_self: &Arc<Self>) {} in wake_by_ref()
1115 let arc = Arc::new(Mutex::new(mu)); in arc_nested()
1127 let arc = Arc::new(Mutex::new(1)); in arc_access_in_unwind()
1131 i: Arc<Mutex<i32>>, in arc_access_in_unwind()
1165 let mu = Arc::new(Mutex::new(0usize)); in high_contention()
1188 async fn increment(mu: Arc<Mutex<usize>>, alt_mu: Arc<Mutex<usize>>, tx: Sender<()>) { in high_contention_with_cancel()
1200 let mu = Arc::new(Mutex::new(0usize)); in high_contention_with_cancel()
1201 let alt_mu = Arc::new(Mutex::new(0usize)); in high_contention_with_cancel()
1205 ex.spawn_ok(increment(Arc::clone(&mu), Arc::clone(&alt_mu), tx.clone())); in high_contention_with_cancel()
1256 async fn increment(mu: Arc<Mutex<usize>>, tx: Sender<()>) { in multi_thread_async()
1265 let mu = Arc::new(Mutex::new(0usize)); in multi_thread_async()
1268 ex.spawn_ok(increment(Arc::clone(&mu), tx.clone())); in multi_thread_async()
1295 struct NeedsDrop(Arc<AtomicUsize>); in into_inner_drop()
1302 let value = Arc::new(AtomicUsize::new(0)); in into_inner_drop()
1319 let mu = Arc::new(Mutex::new(0isize)); in rw_arc()
1362 waker: Arc<SpinLock<Option<Waker>>>, in rw_single_thread_async()
1379 fn wake_future(waker: Arc<SpinLock<Option<Waker>>>) { in rw_single_thread_async()
1395 let waker = Arc::new(SpinLock::new(None)); in rw_single_thread_async()
1396 let waker2 = Arc::clone(&waker); in rw_single_thread_async()
1437 async fn writer(mu: Arc<Mutex<isize>>, tx: Sender<()>) { in rw_multi_thread_async()
1450 async fn reader(mu: Arc<Mutex<isize>>, tx: Sender<()>) { in rw_multi_thread_async()
1461 let mu = Arc::new(Mutex::new(0isize)); in rw_multi_thread_async()
1465 ex.spawn_ok(writer(Arc::clone(&mu), txw)); in rw_multi_thread_async()
1469 ex.spawn_ok(reader(Arc::clone(&mu), txr.clone())); in rw_multi_thread_async()
1488 async fn read(mu: Arc<Mutex<()>>) { in wake_all_readers()
1494 async fn write(mu: Arc<Mutex<()>>) { in wake_all_readers()
1498 let mu = Arc::new(Mutex::new(())); in wake_all_readers()
1508 let arc_waker = Arc::new(TestWaker); in wake_all_readers()
1577 async fn tight_loop(mu: Arc<Mutex<bool>>) { in long_wait()
1587 async fn mark_ready(mu: Arc<Mutex<bool>>) { in long_wait()
1591 let mu = Arc::new(Mutex::new(false)); in long_wait()
1595 let arc_waker = Arc::new(TestWaker); in long_wait()
1635 async fn tight_loop(mu: Arc<Mutex<bool>>) { in cancel_long_wait_before_wake()
1645 async fn mark_ready(mu: Arc<Mutex<bool>>) { in cancel_long_wait_before_wake()
1649 let mu = Arc::new(Mutex::new(false)); in cancel_long_wait_before_wake()
1653 let arc_waker = Arc::new(TestWaker); in cancel_long_wait_before_wake()
1682 async fn tight_loop(mu: Arc<Mutex<bool>>) { in cancel_long_wait_after_wake()
1692 async fn mark_ready(mu: Arc<Mutex<bool>>) { in cancel_long_wait_after_wake()
1696 let mu = Arc::new(Mutex::new(false)); in cancel_long_wait_after_wake()
1700 let arc_waker = Arc::new(TestWaker); in cancel_long_wait_after_wake()
1741 async fn inc(mu: Arc<Mutex<usize>>) { in designated_waker()
1745 let mu = Arc::new(Mutex::new(0)); in designated_waker()
1753 let arc_waker = Arc::new(TestWaker); in designated_waker()
1815 async fn inc(mu: Arc<Mutex<usize>>) { in cancel_designated_waker()
1819 let mu = Arc::new(Mutex::new(0)); in cancel_designated_waker()
1823 let arc_waker = Arc::new(TestWaker); in cancel_designated_waker()
1844 async fn inc(mu: Arc<Mutex<usize>>) { in cancel_before_wake()
1848 let mu = Arc::new(Mutex::new(0)); in cancel_before_wake()
1854 let arc_waker = Arc::new(TestWaker); in cancel_before_wake()
1907 async fn inc(mu: Arc<Mutex<usize>>) { in cancel_after_wake()
1911 let mu = Arc::new(Mutex::new(0)); in cancel_after_wake()
1917 let arc_waker = Arc::new(TestWaker); in cancel_after_wake()
1969 async fn timed_lock(timer: oneshot::Receiver<()>, mu: Arc<Mutex<()>>) { in timeout()
1981 let mu = Arc::new(Mutex::new(())); in timeout()
1986 let arc_waker = Arc::new(TestWaker); in timeout()
2021 async fn read_zero(mu: Arc<Mutex<usize>>) { in writer_waiting()
2028 async fn inc(mu: Arc<Mutex<usize>>) { in writer_waiting()
2032 async fn read_one(mu: Arc<Mutex<usize>>) { in writer_waiting()
2038 let mu = Arc::new(Mutex::new(0)); in writer_waiting()
2046 let arc_waker = Arc::new(TestWaker); in writer_waiting()
2096 async fn read(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in transfer_notify_one()
2103 async fn write(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in transfer_notify_one()
2112 let mu = Arc::new(Mutex::new(0)); in transfer_notify_one()
2113 let cv = Arc::new(Condvar::new()); in transfer_notify_one()
2115 let arc_waker = Arc::new(TestWaker); in transfer_notify_one()
2173 async fn dec(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in transfer_waiters_when_unlocked()
2183 let mu = Arc::new(Mutex::new(0)); in transfer_waiters_when_unlocked()
2184 let cv = Arc::new(Condvar::new()); in transfer_waiters_when_unlocked()
2186 let arc_waker = Arc::new(TestWaker); in transfer_waiters_when_unlocked()
2220 async fn read(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in transfer_reader_writer()
2231 async fn write(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in transfer_reader_writer()
2240 async fn lock(mu: Arc<Mutex<usize>>) { in transfer_reader_writer()
2244 let mu = Arc::new(Mutex::new(0)); in transfer_reader_writer()
2245 let cv = Arc::new(Condvar::new()); in transfer_reader_writer()
2247 let arc_waker = Arc::new(TestWaker); in transfer_reader_writer()
2340 async fn read(mu: Arc<Mutex<usize>>, cv: Arc<Condvar>) { in transfer_readers_with_read_lock()
2350 let mu = Arc::new(Mutex::new(0)); in transfer_readers_with_read_lock()
2351 let cv = Arc::new(Condvar::new()); in transfer_readers_with_read_lock()
2353 let arc_waker = Arc::new(TestWaker); in transfer_readers_with_read_lock()