Lines Matching refs:Arc
3 use std::sync::{Arc, Mutex};
22 fn wake_by_ref(arc_self: &Arc<Self>) { in wake_by_ref()
30 let some_w = Arc::new(CountingWaker::new()); in create_from_arc()
33 assert_eq!(2, Arc::strong_count(&some_w)); in create_from_arc()
38 assert_eq!(3, Arc::strong_count(&some_w)); in create_from_arc()
44 assert_eq!(2, Arc::strong_count(&some_w)); in create_from_arc()
46 assert_eq!(1, Arc::strong_count(&some_w)); in create_from_arc()
51 let some_w = Arc::new(CountingWaker::new()); in ref_wake_same()
65 use std::sync::Arc; in proper_refcount_on_wake_panic()
70 fn wake_by_ref(_arc_self: &Arc<Self>) { in proper_refcount_on_wake_panic()
75 let some_w = Arc::new(PanicWaker); in proper_refcount_on_wake_panic()
79 assert_eq!(2, Arc::strong_count(&some_w)); // some_w + w1 in proper_refcount_on_wake_panic()
81 assert_eq!(1, Arc::strong_count(&some_w)); // some_w in proper_refcount_on_wake_panic()