• Home
  • Raw
  • Download

Lines Matching refs:tx

19     let (mut tx, rx) = mpsc::channel::<i32>(16);  in send_recv()
21 block_on(tx.send(1)).unwrap(); in send_recv()
22 drop(tx); in send_recv()
31 let (tx, rx) = mpsc::channel::<i32>(0); in send_recv_no_buffer()
32 pin_mut!(tx, rx); in send_recv_no_buffer()
34 assert!(tx.as_mut().poll_flush(cx).is_ready()); in send_recv_no_buffer()
35 assert!(tx.as_mut().poll_ready(cx).is_ready()); in send_recv_no_buffer()
38 assert!(tx.as_mut().start_send(1).is_ok()); in send_recv_no_buffer()
39 assert!(tx.as_mut().poll_ready(cx).is_pending()); in send_recv_no_buffer()
43 assert!(tx.as_mut().start_send(0).unwrap_err().is_full()); in send_recv_no_buffer()
44 assert!(tx.as_mut().poll_ready(cx).is_pending()); in send_recv_no_buffer()
48 assert!(tx.as_mut().poll_ready(cx).is_ready()); in send_recv_no_buffer()
51 assert!(tx.as_mut().poll_ready(cx).is_ready()); in send_recv_no_buffer()
52 assert!(tx.as_mut().start_send(2).is_ok()); in send_recv_no_buffer()
53 assert!(tx.as_mut().poll_ready(cx).is_pending()); in send_recv_no_buffer()
57 assert!(tx.as_mut().poll_ready(cx).is_ready()); in send_recv_no_buffer()
78 let (mut tx, rx) = mpsc::channel::<i32>(16); in send_recv_threads()
81 block_on(tx.send(1)).unwrap(); in send_recv_threads()
92 let (mut tx, rx) = mpsc::channel::<i32>(0); in send_recv_threads_no_capacity()
95 block_on(tx.send(1)).unwrap(); in send_recv_threads_no_capacity()
96 block_on(tx.send(2)).unwrap(); in send_recv_threads_no_capacity()
107 let (mut tx, mut rx) = mpsc::channel::<i32>(10); in recv_close_gets_none()
114 match tx.poll_ready(cx) { in recv_close_gets_none()
205 let (tx, rx) = mpsc::unbounded::<i32>(); in stress_shared_unbounded()
216 let tx = tx.clone(); in stress_shared_unbounded() localVariable
220 tx.unbounded_send(1).unwrap(); in stress_shared_unbounded()
225 drop(tx); in stress_shared_unbounded()
234 let (tx, rx) = mpsc::channel::<i32>(0); in stress_shared_bounded_hard()
245 let mut tx = tx.clone(); in stress_shared_bounded_hard() localVariable
249 block_on(tx.send(1)).unwrap(); in stress_shared_bounded_hard()
254 drop(tx); in stress_shared_bounded_hard()
265 let (mut tx, rx) = mpsc::channel::<usize>(0); in stress_receiver_multi_task_bounded_hard()
315 block_on(tx.send(i)).unwrap(); in stress_receiver_multi_task_bounded_hard()
317 drop(tx); in stress_receiver_multi_task_bounded_hard()
333 let (tx, rx) = mpsc::channel(1); in stress_drop_sender()
335 block_on(send_one_two_three(tx)); in stress_drop_sender()
346 async fn send_one_two_three(mut tx: mpsc::Sender<i32>) { in send_one_two_three()
348 tx.send(i).await.unwrap(); in send_one_two_three()
355 let (tx, rx) = mpsc::unbounded(); in stress_close_receiver_iter()
360 if tx.unbounded_send(i).is_err() { in stress_close_receiver_iter()
409 let (tx, rx) = mpsc::channel(capacity); in stress_poll_ready()
412 let sender = tx.clone(); in stress_poll_ready()
415 drop(tx); in stress_poll_ready()
434 let (mut tx, rx) = mpsc::channel(0); in try_send_1()
439 if tx.try_send(i).is_ok() { in try_send_1()
456 let (mut tx, rx) = mpsc::channel(0); in try_send_2()
459 tx.try_send("hello").unwrap(); in try_send_2()
465 assert!(tx.poll_ready(cx).is_pending()); in try_send_2()
470 block_on(tx.send("goodbye")).unwrap(); in try_send_2()
483 let (mut tx, rx) = mpsc::channel(0); in try_send_fail()
486 tx.try_send("hello").unwrap(); in try_send_fail()
489 assert!(tx.try_send("fail").is_err()); in try_send_fail()
493 tx.try_send("goodbye").unwrap(); in try_send_fail()
494 drop(tx); in try_send_fail()
502 let (mut tx, mut rx) = mpsc::channel(1); in try_send_recv()
503 tx.try_send("hello").unwrap(); in try_send_recv()
504 tx.try_send("hello").unwrap(); in try_send_recv()
505 tx.try_send("hello").unwrap_err(); // should be full in try_send_recv()
509 tx.try_send("hello").unwrap(); in try_send_recv()
598 let (mut tx, mut rx) = mpsc::channel(1); in send_backpressure()
599 block_on(tx.send(1)).unwrap(); in send_backpressure()
601 let mut task = tx.send(2); in send_backpressure()