• Home
  • Raw
  • Download

Lines Matching refs:rx

181         $($name:pat = $rx:ident.$meth:ident() => $code:expr),+
185 $meth(($rx).inner) -> res => {
211 let (tx, rx) = channel::<i32>(); in smoke()
213 assert_eq!(rx.recv().unwrap(), 1); in smoke()
232 let (tx, rx) = channel::<i32>(); in smoke_shared()
234 assert_eq!(rx.recv().unwrap(), 1); in smoke_shared()
237 assert_eq!(rx.recv().unwrap(), 1); in smoke_shared()
242 let (tx, rx) = channel::<i32>(); in smoke_threads()
246 assert_eq!(rx.recv().unwrap(), 1); in smoke_threads()
252 let (tx, rx) = channel::<i32>(); in smoke_port_gone()
253 drop(rx); in smoke_port_gone()
259 let (tx, rx) = channel::<i32>(); in smoke_shared_port_gone()
260 drop(rx); in smoke_shared_port_gone()
266 let (tx, rx) = channel::<i32>(); in smoke_shared_port_gone2()
267 drop(rx); in smoke_shared_port_gone2()
275 let (tx, rx) = channel::<i32>(); in port_gone_concurrent()
277 rx.recv().unwrap(); in port_gone_concurrent()
285 let (tx, rx) = channel::<i32>(); in port_gone_concurrent_shared()
288 rx.recv().unwrap(); in port_gone_concurrent_shared()
296 let (tx, rx) = channel::<i32>(); in smoke_chan_gone()
298 assert!(rx.recv().is_err()); in smoke_chan_gone()
303 let (tx, rx) = channel::<()>(); in smoke_chan_gone_shared()
307 assert!(rx.recv().is_err()); in smoke_chan_gone_shared()
312 let (tx, rx) = channel::<i32>(); in chan_gone_concurrent()
317 while rx.recv().is_ok() {} in chan_gone_concurrent()
328 let (tx, rx) = channel::<i32>(); in stress()
335 assert_eq!(rx.recv().unwrap(), 1); in stress()
344 let (tx, rx) = channel::<i32>(); in stress_shared()
348 assert_eq!(rx.recv().unwrap(), 1); in stress_shared()
350 assert!(rx.try_recv().is_err()); in stress_shared()
392 let (tx, rx) = channel::<i32>(); in recv_from_outside_runtime()
395 assert_eq!(rx.recv().unwrap(), 1); in recv_from_outside_runtime()
423 let (_tx, rx) = channel::<i32>(); in oneshot_single_thread_close_port_first()
424 drop(rx); in oneshot_single_thread_close_port_first()
437 let (tx, rx) = channel::<Box<i32>>(); in oneshot_single_thread_send_port_close()
438 drop(rx); in oneshot_single_thread_send_port_close()
444 let (tx, rx) = channel::<i32>(); in oneshot_single_thread_recv_chan_close()
446 assert_eq!(rx.recv(), Err(RecvError)); in oneshot_single_thread_recv_chan_close()
451 let (tx, rx) = channel::<Box<i32>>(); in oneshot_single_thread_send_then_recv()
453 assert!(*rx.recv().unwrap() == 10); in oneshot_single_thread_send_then_recv()
458 let (tx, rx) = channel::<i32>(); in oneshot_single_thread_try_send_open()
460 assert!(rx.recv().unwrap() == 10); in oneshot_single_thread_try_send_open()
465 let (tx, rx) = channel::<i32>(); in oneshot_single_thread_try_send_closed()
466 drop(rx); in oneshot_single_thread_try_send_closed()
472 let (tx, rx) = channel::<i32>(); in oneshot_single_thread_try_recv_open()
474 assert!(rx.recv() == Ok(10)); in oneshot_single_thread_try_recv_open()
479 let (tx, rx) = channel::<i32>(); in oneshot_single_thread_try_recv_closed()
481 assert!(rx.recv().is_err()); in oneshot_single_thread_try_recv_closed()
486 let (tx, rx) = channel::<i32>(); in oneshot_single_thread_peek_data()
487 assert_eq!(rx.try_recv(), Err(TryRecvError::Empty)); in oneshot_single_thread_peek_data()
489 assert_eq!(rx.try_recv(), Ok(10)); in oneshot_single_thread_peek_data()
494 let (tx, rx) = channel::<i32>(); in oneshot_single_thread_peek_close()
496 assert_eq!(rx.try_recv(), Err(TryRecvError::Disconnected)); in oneshot_single_thread_peek_close()
497 assert_eq!(rx.try_recv(), Err(TryRecvError::Disconnected)); in oneshot_single_thread_peek_close()
502 let (_tx, rx) = channel::<i32>(); in oneshot_single_thread_peek_open()
503 assert_eq!(rx.try_recv(), Err(TryRecvError::Empty)); in oneshot_single_thread_peek_open()
508 let (tx, rx) = channel::<Box<i32>>(); in oneshot_multi_task_recv_then_send()
510 assert!(*rx.recv().unwrap() == 10); in oneshot_multi_task_recv_then_send()
519 let (tx, rx) = channel::<Box<i32>>(); in oneshot_multi_task_recv_then_close()
524 assert_eq!(rx.recv(), Err(RecvError)); in oneshot_multi_task_recv_then_close()
536 let (tx, rx) = channel::<i32>(); in oneshot_multi_thread_close_stress()
538 drop(rx); in oneshot_multi_thread_close_stress()
553 let (tx, rx) = channel::<i32>(); in oneshot_multi_thread_send_close_stress()
555 drop(rx); in oneshot_multi_thread_send_close_stress()
574 let (tx, rx) = channel::<i32>(); in oneshot_multi_thread_recv_close_stress()
577 assert_eq!(rx.recv(), Err(RecvError)); in oneshot_multi_thread_recv_close_stress()
601 let (tx, rx) = channel::<Box<isize>>(); in oneshot_multi_thread_send_recv_stress()
606 assert!(*rx.recv().unwrap() == 10); in oneshot_multi_thread_send_recv_stress()
618 let (tx, rx) = channel(); in stream_send_recv_stress()
623 if let Some(t2) = recv(rx, 0) { in stream_send_recv_stress()
638 fn recv(rx: Receiver<Box<i32>>, i: i32) -> Option<JoinHandle<()>> { in stream_send_recv_stress()
644 assert!(*rx.recv().unwrap() == i); in stream_send_recv_stress()
645 recv(rx, i + 1); in stream_send_recv_stress()
656 let (tx, rx) = channel(); in oneshot_single_thread_recv_timeout()
658 assert_eq!(rx.recv_timeout(Duration::from_millis(1)), Ok(())); in oneshot_single_thread_recv_timeout()
660 rx.recv_timeout(Duration::from_millis(1)), in oneshot_single_thread_recv_timeout()
664 assert_eq!(rx.recv_timeout(Duration::from_millis(1)), Ok(())); in oneshot_single_thread_recv_timeout()
669 let (tx, rx) = channel(); in stress_recv_timeout_two_threads()
684 match rx.recv_timeout(timeout) { in stress_recv_timeout_two_threads()
700 let (tx, rx) = channel::<()>(); in recv_timeout_upgrade()
705 assert_eq!(rx.recv_timeout(timeout), Err(RecvTimeoutError::Timeout)); in recv_timeout_upgrade()
711 let (tx, rx) = channel(); in stress_recv_timeout_shared()
728 match rx.recv_timeout(Duration::from_millis(10)) { in stress_recv_timeout_shared()
752 let (tx, rx) = channel(); in recv_a_lot()
757 rx.recv().unwrap(); in recv_a_lot()
763 let (tx, rx) = channel(); in shared_recv_timeout()
775 rx.recv().unwrap(); in shared_recv_timeout()
779 rx.recv_timeout(Duration::from_millis(1)), in shared_recv_timeout()
783 assert_eq!(rx.recv_timeout(Duration::from_millis(1)), Ok(())); in shared_recv_timeout()
791 let (tx, rx) = channel(); in shared_chan_stress()
803 rx.recv().unwrap(); in shared_chan_stress()
812 let (tx, rx) = channel::<i32>(); in test_nested_recv_iter()
817 for x in rx.iter() { in test_nested_recv_iter()
833 let (tx, rx) = channel::<i32>(); in test_recv_iter_break()
838 for x in rx.iter() { in test_recv_iter_break()
888 let (tx, rx) = channel::<i32>(); in test_recv_into_iter_owned()
892 rx.into_iter() in test_recv_into_iter_owned()
901 let (tx, rx) = channel::<i32>(); in test_recv_into_iter_borrowed()
905 let mut iter = (&rx).into_iter(); in test_recv_into_iter_borrowed()
940 let (tx, rx) = channel(); in destroy_upgraded_shared_port_when_sender_still_active()
943 rx.recv().unwrap(); // wait on a oneshot in destroy_upgraded_shared_port_when_sender_still_active()
944 drop(rx); // destroy a shared in destroy_upgraded_shared_port_when_sender_still_active()
987 let (tx, rx) = sync_channel::<i32>(1); in smoke()
989 assert_eq!(rx.recv().unwrap(), 1); in smoke()
1000 let (tx, rx) = sync_channel::<i32>(1); in smoke_shared()
1002 assert_eq!(rx.recv().unwrap(), 1); in smoke_shared()
1005 assert_eq!(rx.recv().unwrap(), 1); in smoke_shared()
1010 let (tx, rx) = sync_channel::<i32>(1); in recv_timeout()
1012 rx.recv_timeout(Duration::from_millis(1)), in recv_timeout()
1016 assert_eq!(rx.recv_timeout(Duration::from_millis(1)), Ok(1)); in recv_timeout()
1021 let (tx, rx) = sync_channel::<i32>(0); in smoke_threads()
1025 assert_eq!(rx.recv().unwrap(), 1); in smoke_threads()
1031 let (tx, rx) = sync_channel::<i32>(0); in smoke_port_gone()
1032 drop(rx); in smoke_port_gone()
1038 let (tx, rx) = sync_channel::<i32>(0); in smoke_shared_port_gone2()
1039 drop(rx); in smoke_shared_port_gone2()
1047 let (tx, rx) = sync_channel::<i32>(0); in port_gone_concurrent()
1049 rx.recv().unwrap(); in port_gone_concurrent()
1057 let (tx, rx) = sync_channel::<i32>(0); in port_gone_concurrent_shared()
1060 rx.recv().unwrap(); in port_gone_concurrent_shared()
1068 let (tx, rx) = sync_channel::<i32>(0); in smoke_chan_gone()
1070 assert!(rx.recv().is_err()); in smoke_chan_gone()
1075 let (tx, rx) = sync_channel::<()>(0); in smoke_chan_gone_shared()
1079 assert!(rx.recv().is_err()); in smoke_chan_gone_shared()
1084 let (tx, rx) = sync_channel::<i32>(0); in chan_gone_concurrent()
1089 while rx.recv().is_ok() {} in chan_gone_concurrent()
1100 let (tx, rx) = sync_channel::<i32>(0); in stress()
1107 assert_eq!(rx.recv().unwrap(), 1); in stress()
1119 let (tx, rx) = sync_channel::<i32>(0); in stress_recv_timeout_two_threads()
1129 match rx.recv_timeout(Duration::from_millis(1)) { in stress_recv_timeout_two_threads()
1150 let (tx, rx) = sync_channel::<i32>(0); in stress_recv_timeout_shared()
1156 match rx.recv_timeout(Duration::from_millis(10)) { in stress_recv_timeout_shared()
1167 assert!(rx.try_recv().is_err()); in stress_recv_timeout_shared()
1199 let (tx, rx) = sync_channel::<i32>(0); in stress_shared()
1204 assert_eq!(rx.recv().unwrap(), 1); in stress_shared()
1206 assert!(rx.try_recv().is_err()); in stress_shared()
1231 let (_tx, rx) = sync_channel::<i32>(0); in oneshot_single_thread_close_port_first()
1232 drop(rx); in oneshot_single_thread_close_port_first()
1245 let (tx, rx) = sync_channel::<Box<i32>>(0); in oneshot_single_thread_send_port_close()
1246 drop(rx); in oneshot_single_thread_send_port_close()
1252 let (tx, rx) = sync_channel::<i32>(0); in oneshot_single_thread_recv_chan_close()
1254 assert_eq!(rx.recv(), Err(RecvError)); in oneshot_single_thread_recv_chan_close()
1259 let (tx, rx) = sync_channel::<Box<i32>>(1); in oneshot_single_thread_send_then_recv()
1261 assert!(*rx.recv().unwrap() == 10); in oneshot_single_thread_send_then_recv()
1266 let (tx, rx) = sync_channel::<i32>(1); in oneshot_single_thread_try_send_open()
1268 assert!(rx.recv().unwrap() == 10); in oneshot_single_thread_try_send_open()
1273 let (tx, rx) = sync_channel::<i32>(0); in oneshot_single_thread_try_send_closed()
1274 drop(rx); in oneshot_single_thread_try_send_closed()
1286 let (tx, rx) = sync_channel::<i32>(1); in oneshot_single_thread_try_recv_open()
1288 assert!(rx.recv() == Ok(10)); in oneshot_single_thread_try_recv_open()
1293 let (tx, rx) = sync_channel::<i32>(0); in oneshot_single_thread_try_recv_closed()
1295 assert!(rx.recv().is_err()); in oneshot_single_thread_try_recv_closed()
1300 let (tx, rx) = sync_channel::<i32>(1); in oneshot_single_thread_try_recv_closed_with_data()
1303 assert_eq!(rx.try_recv(), Ok(10)); in oneshot_single_thread_try_recv_closed_with_data()
1304 assert_eq!(rx.try_recv(), Err(TryRecvError::Disconnected)); in oneshot_single_thread_try_recv_closed_with_data()
1309 let (tx, rx) = sync_channel::<i32>(1); in oneshot_single_thread_peek_data()
1310 assert_eq!(rx.try_recv(), Err(TryRecvError::Empty)); in oneshot_single_thread_peek_data()
1312 assert_eq!(rx.try_recv(), Ok(10)); in oneshot_single_thread_peek_data()
1317 let (tx, rx) = sync_channel::<i32>(0); in oneshot_single_thread_peek_close()
1319 assert_eq!(rx.try_recv(), Err(TryRecvError::Disconnected)); in oneshot_single_thread_peek_close()
1320 assert_eq!(rx.try_recv(), Err(TryRecvError::Disconnected)); in oneshot_single_thread_peek_close()
1325 let (_tx, rx) = sync_channel::<i32>(0); in oneshot_single_thread_peek_open()
1326 assert_eq!(rx.try_recv(), Err(TryRecvError::Empty)); in oneshot_single_thread_peek_open()
1331 let (tx, rx) = sync_channel::<Box<i32>>(0); in oneshot_multi_task_recv_then_send()
1333 assert!(*rx.recv().unwrap() == 10); in oneshot_multi_task_recv_then_send()
1342 let (tx, rx) = sync_channel::<Box<i32>>(0); in oneshot_multi_task_recv_then_close()
1347 assert_eq!(rx.recv(), Err(RecvError)); in oneshot_multi_task_recv_then_close()
1359 let (tx, rx) = sync_channel::<i32>(0); in oneshot_multi_thread_close_stress()
1361 drop(rx); in oneshot_multi_thread_close_stress()
1376 let (tx, rx) = sync_channel::<i32>(0); in oneshot_multi_thread_send_close_stress()
1378 drop(rx); in oneshot_multi_thread_send_close_stress()
1397 let (tx, rx) = sync_channel::<i32>(0); in oneshot_multi_thread_recv_close_stress()
1400 assert_eq!(rx.recv(), Err(RecvError)); in oneshot_multi_thread_recv_close_stress()
1423 let (tx, rx) = sync_channel::<Box<i32>>(0); in oneshot_multi_thread_send_recv_stress()
1428 assert!(*rx.recv().unwrap() == 10); in oneshot_multi_thread_send_recv_stress()
1440 let (tx, rx) = sync_channel::<Box<i32>>(0); in stream_send_recv_stress()
1445 if let Some(t) = recv(rx, 0) { in stream_send_recv_stress()
1460 fn recv(rx: Receiver<Box<i32>>, i: i32) -> Option<JoinHandle<()>> { in stream_send_recv_stress()
1466 assert!(*rx.recv().unwrap() == i); in stream_send_recv_stress()
1467 recv(rx, i + 1); in stream_send_recv_stress()
1484 let (tx, rx) = sync_channel(N); in recv_a_lot()
1489 rx.recv().unwrap(); in recv_a_lot()
1495 let (tx, rx) = sync_channel(0); in shared_chan_stress()
1507 rx.recv().unwrap(); in shared_chan_stress()
1516 let (tx, rx) = sync_channel::<i32>(0); in test_nested_recv_iter()
1521 for x in rx.iter() { in test_nested_recv_iter()
1537 let (tx, rx) = sync_channel::<i32>(0); in test_recv_iter_break()
1542 for x in rx.iter() { in test_recv_iter_break()
1590 let (tx, rx) = sync_channel::<()>(0); in destroy_upgraded_shared_port_when_sender_still_active()
1593 rx.recv().unwrap(); // wait on a oneshot in destroy_upgraded_shared_port_when_sender_still_active()
1594 drop(rx); // destroy a shared in destroy_upgraded_shared_port_when_sender_still_active()
1614 let (tx, rx) = sync_channel::<i32>(0); in send1()
1616 rx.recv().unwrap(); in send1()
1624 let (tx, rx) = sync_channel::<i32>(0); in send2()
1626 drop(rx); in send2()
1634 let (tx, rx) = sync_channel::<i32>(1); in send3()
1637 drop(rx); in send3()
1645 let (tx, rx) = sync_channel::<i32>(0); in send4()
1657 drop(rx); in send4()
1679 let (tx, rx) = sync_channel::<i32>(1); in try_send3()
1681 drop(rx); in try_send3()
1928 let (tx, rx) = channel(); in preflight1()
1931 _n = rx.recv() => {} in preflight1()
1937 let (tx, rx) = channel(); in preflight2()
1941 _n = rx.recv() => {} in preflight2()
1947 let (tx, rx) = channel(); in preflight3()
1951 _n = rx.recv() => {} in preflight3()
1957 let (tx, rx) = channel(); in preflight4()
1960 _ = rx.recv() => {} in preflight4()
1966 let (tx, rx) = channel(); in preflight5()
1970 _ = rx.recv() => {} in preflight5()
1976 let (tx, rx) = channel(); in preflight6()
1980 _ = rx.recv() => {} in preflight6()
1986 let (tx, rx) = channel::<()>(); in preflight7()
1989 _ = rx.recv() => {} in preflight7()
1995 let (tx, rx) = channel(); in preflight8()
1998 rx.recv().unwrap(); in preflight8()
2000 _ = rx.recv() => {} in preflight8()
2006 let (tx, rx) = channel(); in preflight9()
2010 rx.recv().unwrap(); in preflight9()
2012 _ = rx.recv() => {} in preflight9()
2082 let (tx, rx) = sync_channel::<i32>(1); in sync1()
2085 n = rx.recv() => { assert_eq!(n.unwrap(), 1); } in sync1()
2091 let (tx, rx) = sync_channel::<i32>(0); in sync2()
2099 n = rx.recv() => { assert_eq!(n.unwrap(), 1); } in sync2()