• Home
  • Raw
  • Download

Lines Matching refs:rx

20     let (mut tx, rx) = mpsc::channel::<i32>(16);  in send_recv()
24 let v: Vec<_> = block_on(rx.collect()); in send_recv()
32 let (tx, rx) = mpsc::channel::<i32>(0); in send_recv_no_buffer()
33 pin_mut!(tx, rx); in send_recv_no_buffer()
48 assert_eq!(rx.as_mut().poll_next(cx), Poll::Ready(Some(1))); in send_recv_no_buffer()
57 assert_eq!(rx.as_mut().poll_next(cx), Poll::Ready(Some(2))); in send_recv_no_buffer()
66 let (mut tx1, rx) = mpsc::channel::<i32>(16); in send_shared_recv()
67 let mut rx = block_on_stream(rx); in send_shared_recv() localVariable
71 assert_eq!(rx.next(), Some(1)); in send_shared_recv()
74 assert_eq!(rx.next(), Some(2)); in send_shared_recv()
79 let (mut tx, rx) = mpsc::channel::<i32>(16); in send_recv_threads()
85 let v: Vec<_> = block_on(rx.take(1).collect()); in send_recv_threads()
93 let (mut tx, rx) = mpsc::channel::<i32>(0); in send_recv_threads_no_capacity()
100 let v: Vec<_> = block_on(rx.collect()); in send_recv_threads_no_capacity()
108 let (mut tx, mut rx) = mpsc::channel::<i32>(10); in recv_close_gets_none()
112 rx.close(); in recv_close_gets_none()
114 assert_eq!(rx.poll_next_unpin(cx), Poll::Ready(None)); in recv_close_gets_none()
126 let (_, mut rx) = mpsc::channel::<i32>(10); in tx_close_gets_none()
130 assert_eq!(rx.poll_next_unpin(cx), Poll::Ready(None)); in tx_close_gets_none()
206 let (tx, rx) = mpsc::unbounded::<i32>(); in stress_shared_unbounded()
209 let result: Vec<_> = block_on(rx.collect()); in stress_shared_unbounded()
235 let (tx, rx) = mpsc::channel::<i32>(0); in stress_shared_bounded_hard()
238 let result: Vec<_> = block_on(rx.collect()); in stress_shared_bounded_hard()
266 let (mut tx, rx) = mpsc::channel::<usize>(0); in stress_receiver_multi_task_bounded_hard()
267 let rx = Arc::new(Mutex::new(Some(rx))); in stress_receiver_multi_task_bounded_hard() localVariable
273 let rx = rx.clone(); in stress_receiver_multi_task_bounded_hard() localVariable
281 let mut rx_opt = rx.lock().unwrap(); in stress_receiver_multi_task_bounded_hard()
282 if let Some(rx) = &mut *rx_opt { in stress_receiver_multi_task_bounded_hard()
284 let item = block_on(rx.next()); in stress_receiver_multi_task_bounded_hard()
295 match rx.poll_next_unpin(&mut noop_context()) { in stress_receiver_multi_task_bounded_hard()
334 let (tx, rx) = mpsc::channel(1); in stress_drop_sender()
338 rx in stress_drop_sender()
356 let (tx, rx) = mpsc::unbounded(); in stress_close_receiver_iter()
357 let mut rx = block_on_stream(rx); in stress_close_receiver_iter() localVariable
369 assert_eq!(Some(1), rx.next()); in stress_close_receiver_iter()
371 rx.close(); in stress_close_receiver_iter()
374 match rx.next() { in stress_close_receiver_iter()
410 let (tx, rx) = mpsc::channel(capacity); in stress_poll_ready()
418 let result: Vec<_> = block_on(rx.collect()); in stress_poll_ready()
435 let (mut tx, rx) = mpsc::channel(0); in try_send_1()
447 let result: Vec<_> = block_on(rx.collect()); in try_send_1()
457 let (mut tx, rx) = mpsc::channel(0); in try_send_2()
458 let mut rx = block_on_stream(rx); in try_send_2() localVariable
475 assert_eq!(rx.next(), Some("hello")); in try_send_2()
476 assert_eq!(rx.next(), Some("goodbye")); in try_send_2()
477 assert_eq!(rx.next(), None); in try_send_2()
484 let (mut tx, rx) = mpsc::channel(0); in try_send_fail()
485 let mut rx = block_on_stream(rx); in try_send_fail() localVariable
492 assert_eq!(rx.next(), Some("hello")); in try_send_fail()
497 assert_eq!(rx.next(), Some("goodbye")); in try_send_fail()
498 assert_eq!(rx.next(), None); in try_send_fail()
503 let (mut tx, mut rx) = mpsc::channel(1); in try_send_recv()
507 rx.try_next().unwrap(); in try_send_recv()
508 rx.try_next().unwrap(); in try_send_recv()
509 rx.try_next().unwrap_err(); // should be empty in try_send_recv()
511 rx.try_next().unwrap(); in try_send_recv()
512 rx.try_next().unwrap_err(); // should be empty in try_send_recv()
599 let (mut tx, mut rx) = mpsc::channel(1); in send_backpressure()
606 let item = block_on(rx.next()).unwrap(); in send_backpressure()
611 let item = block_on(rx.next()).unwrap(); in send_backpressure()
620 let (mut tx1, mut rx) = mpsc::channel(1); in send_backpressure_multi_senders()
628 let item = block_on(rx.next()).unwrap(); in send_backpressure_multi_senders()
633 let item = block_on(rx.next()).unwrap(); in send_backpressure_multi_senders()
641 let (tx, mut rx) = mpsc::unbounded(); in unbounded_len()
650 let item = block_on(rx.next()).unwrap(); in unbounded_len()
654 let item = block_on(rx.next()).unwrap(); in unbounded_len()