Lines Matching refs:rx
14 let (tx, mut rx) = watch::channel("one"); in single_rx_recv()
18 let mut t = spawn(rx.changed()); in single_rx_recv()
21 assert_eq!(*rx.borrow(), "one"); in single_rx_recv()
24 let mut t = spawn(rx.changed()); in single_rx_recv()
33 assert_eq!(*rx.borrow(), "two"); in single_rx_recv()
36 let mut t = spawn(rx.changed()); in single_rx_recv()
44 assert_eq!(*rx.borrow(), "two"); in single_rx_recv()
118 let (tx, mut rx) = watch::channel("one"); in rx_observes_final_value()
122 let mut t1 = spawn(rx.changed()); in rx_observes_final_value()
125 assert_eq!(*rx.borrow(), "one"); in rx_observes_final_value()
129 let (tx, mut rx) = watch::channel("one"); in rx_observes_final_value()
134 let mut t1 = spawn(rx.changed()); in rx_observes_final_value()
137 assert_eq!(*rx.borrow(), "two"); in rx_observes_final_value()
140 let mut t1 = spawn(rx.changed()); in rx_observes_final_value()
150 assert_eq!(*rx.borrow(), "three"); in rx_observes_final_value()
153 let mut t1 = spawn(rx.changed()); in rx_observes_final_value()
156 assert_eq!(*rx.borrow(), "three"); in rx_observes_final_value()
161 let (tx, rx) = watch::channel("one"); in poll_close()
167 drop(rx); in poll_close()
178 let (tx, mut rx) = watch::channel("one"); in borrow_and_update()
180 assert!(!rx.has_changed().unwrap()); in borrow_and_update()
183 assert!(rx.has_changed().unwrap()); in borrow_and_update()
184 assert_ready!(spawn(rx.changed()).poll()).unwrap(); in borrow_and_update()
185 assert_pending!(spawn(rx.changed()).poll()); in borrow_and_update()
186 assert!(!rx.has_changed().unwrap()); in borrow_and_update()
189 assert!(rx.has_changed().unwrap()); in borrow_and_update()
190 assert_eq!(*rx.borrow_and_update(), "three"); in borrow_and_update()
191 assert_pending!(spawn(rx.changed()).poll()); in borrow_and_update()
192 assert!(!rx.has_changed().unwrap()); in borrow_and_update()
195 assert_eq!(*rx.borrow_and_update(), "three"); in borrow_and_update()
196 assert_ready!(spawn(rx.changed()).poll()).unwrap_err(); in borrow_and_update()
197 assert!(rx.has_changed().is_err()); in borrow_and_update()
202 let (tx, rx) = watch::channel("one"); in reopened_after_subscribe()
205 drop(rx); in reopened_after_subscribe()
208 let rx = tx.subscribe(); in reopened_after_subscribe() localVariable
211 drop(rx); in reopened_after_subscribe()
219 let (tx, mut rx) = watch::channel("one"); in send_modify_panic()
222 assert_eq!(*rx.borrow_and_update(), "two"); in send_modify_panic()
224 let mut rx2 = rx.clone(); in send_modify_panic()
238 assert_eq!(*rx.borrow(), "panicked"); in send_modify_panic()
242 assert_eq!(*rx.borrow_and_update(), "three"); in send_modify_panic()