Home
last modified time | relevance | path

Searched refs:mpsc (Results 1 – 25 of 98) sorted by relevance

1234

/external/rust/crates/futures/tests/
Deager_drop.rs5 use std::sync::mpsc; in map_ok()
9 let (tx1, rx1) = mpsc::channel::<()>(); in map_ok()
10 let (tx2, rx2) = mpsc::channel::<()>(); in map_ok()
27 use std::sync::mpsc; in map_err()
31 let (tx1, rx1) = mpsc::channel::<()>(); in map_err()
32 let (tx2, rx2) = mpsc::channel::<()>(); in map_err()
71 use std::sync::mpsc; in then_drops_eagerly()
74 let (tx1, rx1) = mpsc::channel::<()>(); in then_drops_eagerly()
75 let (tx2, rx2) = mpsc::channel::<()>(); in then_drops_eagerly()
85 assert_eq!(Err(mpsc::TryRecvError::Empty), rx2.try_recv()); in then_drops_eagerly()
[all …]
Doneshot.rs6 use std::sync::mpsc; in oneshot_send1()
10 let (tx2, rx2) = mpsc::channel(); in oneshot_send1()
23 use std::sync::mpsc; in oneshot_send2()
27 let (tx2, rx2) = mpsc::channel(); in oneshot_send2()
39 use std::sync::mpsc; in oneshot_send3()
43 let (tx2, rx2) = mpsc::channel(); in oneshot_send3()
55 use std::sync::mpsc; in oneshot_drop_tx1()
58 let (tx2, rx2) = mpsc::channel(); in oneshot_drop_tx1()
71 use std::sync::mpsc; in oneshot_drop_tx2()
75 let (tx2, rx2) = mpsc::channel(); in oneshot_drop_tx2()
Deventual.rs5 use std::sync::mpsc;
15 let (tx, rx) = mpsc::channel(); in join1()
25 let (tx, rx) = mpsc::channel(); in join2()
39 let (tx, rx) = mpsc::channel(); in join3()
52 let (tx, rx) = mpsc::channel(); in join4()
66 let (tx, rx) = mpsc::channel(); in join5()
82 let (tx, rx) = mpsc::channel(); in select1()
90 let (tx, rx) = mpsc::channel(); in select1()
101 let (tx, rx) = mpsc::channel(); in select2()
109 let (tx, rx) = mpsc::channel(); in select2()
[all …]
Dsink.rs324 use futures::channel::mpsc; in mpsc_blocking_start_send()
333 let (mut tx, mut rx) = mpsc::channel::<i32>(0); in mpsc_blocking_start_send()
424 use futures::channel::mpsc; in with_propagates_poll_ready()
434 let (tx, mut rx) = mpsc::channel::<i32>(0); in with_propagates_poll_ready()
435 let mut tx = tx.with(|item: i32| future::ok::<i32, mpsc::SendError>(item + 10)); in with_propagates_poll_ready()
489 use futures::channel::mpsc; in with_implements_clone()
494 let (mut tx, rx) = mpsc::channel(5); in with_implements_clone()
499 .with(|item| future::ok::<bool, mpsc::SendError>(item > 0)); in with_implements_clone()
503 .with(|item: &str| future::ok::<bool, mpsc::SendError>(item.len() > 5)); in with_implements_clone()
585 use futures::channel::mpsc; in fanout_backpressure()
[all …]
Dsink_fanout.rs3 use futures::channel::mpsc; in it_works()
9 let (tx1, rx1) = mpsc::channel(1); in it_works()
10 let (tx2, rx2) = mpsc::channel(2); in it_works()
Dstream_select_all.rs54 use futures::channel::mpsc; in works_1()
58 let (a_tx, a_rx) = mpsc::unbounded::<u32>(); in works_1()
59 let (b_tx, b_rx) = mpsc::unbounded::<u32>(); in works_1()
60 let (c_tx, c_rx) = mpsc::unbounded::<u32>(); in works_1()
/external/rust/crates/tokio/tests/
Dsync_mpsc.rs7 use tokio::sync::mpsc;
8 use tokio::sync::mpsc::error::TrySendError;
21 impl AssertSend for mpsc::Sender<i32> {}
22 impl AssertSend for mpsc::Receiver<i32> {}
26 let (tx, mut rx) = mpsc::channel::<i32>(16); in send_recv_with_buffer()
50 let (tx, mut rx) = mpsc::channel::<i32>(2); in reserve_disarm()
104 let (tx, mut rx) = mpsc::channel(16); in async_send_recv_with_buffer()
122 let (tx1, mut rx) = mpsc::channel(1); in start_send_past_cap()
151 mpsc::channel::<i32>(0); in buffer_gteq_one()
156 let (tx, mut rx) = mpsc::unbounded_channel::<i32>(); in send_recv_unbounded()
[all …]
Drt_threaded.rs15 use std::sync::{mpsc, Arc};
33 let (tx, rx) = mpsc::channel(); in many_oneshot_futures()
69 let (start_tx, mut chain_rx) = tokio::sync::mpsc::channel(10); in many_multishot_futures()
72 let (next_tx, next_rx) = tokio::sync::mpsc::channel(10); in many_multishot_futures()
85 let (final_tx, final_rx) = tokio::sync::mpsc::channel(10); in many_multishot_futures()
124 let (tx, rx) = mpsc::channel(); in spawn_shutdown()
140 async fn client_server(tx: mpsc::Sender<()>) { in client_server()
260 let (tx, rx) = mpsc::channel(); in blocking()
307 let (done_tx, done_rx) = mpsc::channel(); in multi_threadpool()
339 let (tx, mut rx) = tokio::sync::mpsc::channel(1024); in coop_and_block_in_place()
[all …]
Drt_common.rs68 use std::sync::{mpsc, Arc};
169 use tokio::sync::mpsc;
176 let (done_tx, mut done_rx) = mpsc::unbounded_channel();
219 use tokio::sync::mpsc;
227 let (done_tx, mut done_rx) = mpsc::unbounded_channel();
641 let (tx, rx) = mpsc::channel();
709 use std::sync::mpsc;
712 drop_tx: mpsc::Sender<()>,
731 let (drop_tx, drop_rx) = mpsc::channel();
910 async fn client_server(tx: mpsc::Sender<()>) {
[all …]
/external/rust/crates/futures-channel/tests/
Dmpsc.rs1 use futures::channel::{mpsc, oneshot};
14 impl AssertSend for mpsc::Sender<i32> {}
15 impl AssertSend for mpsc::Receiver<i32> {}
19 let (mut tx, rx) = mpsc::channel::<i32>(16); in send_recv()
31 let (tx, rx) = mpsc::channel::<i32>(0); in send_recv_no_buffer()
65 let (mut tx1, rx) = mpsc::channel::<i32>(16); in send_shared_recv()
78 let (mut tx, rx) = mpsc::channel::<i32>(16); in send_recv_threads()
92 let (mut tx, rx) = mpsc::channel::<i32>(0); in send_recv_threads_no_capacity()
107 let (mut tx, mut rx) = mpsc::channel::<i32>(10); in recv_close_gets_none()
125 let (_, mut rx) = mpsc::channel::<i32>(10); in tx_close_gets_none()
[all …]
Dmpsc-close.rs1 use futures::channel::mpsc;
14 let (mut sender, receiver) = mpsc::channel(1); in smoke()
29 let (mut tx1, mut rx) = mpsc::channel(1); in multiple_senders_disconnect()
51 let (mut tx1, mut rx) = mpsc::unbounded(); in multiple_senders_disconnect()
76 let (mut tx1, mut rx) = mpsc::channel(1); in multiple_senders_close_channel()
92 let (tx1, mut rx) = mpsc::unbounded(); in multiple_senders_close_channel()
114 let (sender, receiver) = mpsc::unbounded(); in single_receiver_drop_closes_channel_and_drains()
133 let (mut sender, receiver) = mpsc::channel(1); in single_receiver_drop_closes_channel_and_drains()
167 rx: mpsc::Receiver<Arc<()>>, in stress_try_send_as_receiver_closes()
172 command_rx: mpsc::Receiver<TestRx>, in stress_try_send_as_receiver_closes()
[all …]
Dchannel.rs1 use futures::channel::mpsc;
11 let (tx, rx) = mpsc::channel(1); in sequence()
27 async fn send_sequence(n: u32, mut sender: mpsc::Sender<u32>) { in send_sequence()
35 let (tx, mut rx) = mpsc::channel::<u32>(1); in drop_sender()
45 let (mut tx, rx) = mpsc::channel::<u32>(1); in drop_rx()
54 let (mut tx, rx) = mpsc::channel(1); in drop_order()
Doneshot.rs6 use std::sync::mpsc;
38 let (tx, rx) = mpsc::channel::<(Sender<_>, mpsc::Sender<_>)>(); in cancel_lots()
48 let (tx2, rx2) = mpsc::channel(); in cancel_lots()
84 let (tx2, rx2) = mpsc::channel(); in close_wakes()
104 let (tx, rx) = mpsc::channel::<Sender<_>>(); in cancel_sends()
/external/rust/crates/tokio/src/sync/tests/
Dloom_mpsc.rs1 use crate::sync::mpsc;
12 let (tx, mut rx) = mpsc::channel(16); in closing_tx()
30 let (tx, mut rx) = mpsc::unbounded_channel(); in closing_unbounded_tx()
48 let (tx1, rx) = mpsc::channel::<()>(16); in closing_bounded_rx()
62 let (tx1, mut rx) = mpsc::channel::<()>(16); in closing_and_sending()
89 let (tx1, rx) = mpsc::unbounded_channel::<()>(); in closing_unbounded_rx()
103 let (tx, mut rx) = mpsc::channel::<()>(16); in dropping_tx()
121 let (tx, mut rx) = mpsc::unbounded_channel::<()>(); in dropping_unbounded_tx()
/external/rust/crates/tokio-stream/tests/
Dstream_collect.rs5 pub(crate) mod mpsc; module
8 use support::mpsc;
45 let (tx, rx) = mpsc::unbounded_channel_stream(); in collect_vec_items()
66 let (tx, rx) = mpsc::unbounded_channel_stream(); in collect_string_items()
88 let (tx, rx) = mpsc::unbounded_channel_stream(); in collect_str_items()
110 let (tx, rx) = mpsc::unbounded_channel_stream(); in collect_results_ok()
132 let (tx, rx) = mpsc::unbounded_channel_stream(); in collect_results_err()
Dstream_merge.rs6 pub(crate) mod mpsc; module
9 use support::mpsc;
26 let (tx1, rx1) = mpsc::unbounded_channel_stream(); in merge_async_streams()
27 let (tx2, rx2) = mpsc::unbounded_channel_stream(); in merge_async_streams()
Dstream_chain.rs5 pub(crate) mod mpsc; module
8 use support::mpsc;
44 let (tx1, rx1) = mpsc::unbounded_channel_stream(); in pending_first()
45 let (tx2, rx2) = mpsc::unbounded_channel_stream(); in pending_first()
Dstream_stream_map.rs5 pub(crate) mod mpsc; module
8 use support::mpsc;
46 let (tx, rx) = mpsc::unbounded_channel_stream(); in single_entry()
85 let (tx1, rx1) = mpsc::unbounded_channel_stream(); in multiple_entries()
86 let (tx2, rx2) = mpsc::unbounded_channel_stream(); in multiple_entries()
144 let (tx, rx) = mpsc::unbounded_channel_stream(); in insert_remove()
174 let (tx1, rx1) = mpsc::unbounded_channel_stream(); in replace()
175 let (tx2, rx2) = mpsc::unbounded_channel_stream(); in replace()
/external/rust/crates/futures-channel/benches/
Dsync_mpsc.rs8 channel::mpsc::{self, Sender, UnboundedSender},
23 let (tx, mut rx) = mpsc::unbounded(); in unbounded_1_tx()
45 let (tx, mut rx) = mpsc::unbounded(); in unbounded_100_tx()
66 let (tx, mut rx) = mpsc::unbounded(); in unbounded_uncontended()
106 let (tx, mut rx) = mpsc::channel(0); in bounded_1_tx()
124 let (tx, mut rx) = mpsc::channel(0); in bounded_100_tx()
/external/rust/crates/crossbeam-utils/tests/
Dwait_group.rs1 use std::sync::mpsc;
12 let (tx, rx) = mpsc::channel(); in wait()
41 let (tx, rx) = mpsc::channel(); in wait_and_drop()
/external/rust/crates/tokio/tests/support/
Dmpsc_stream.rs5 use tokio::sync::mpsc::{self, Receiver, Sender, UnboundedReceiver, UnboundedSender};
19 let (tx, rx) = mpsc::unbounded_channel(); in unbounded_channel_stream()
37 let (tx, rx) = mpsc::channel(size); in channel_stream()
/external/crosvm/src/
Dgdb.rs6 use std::sync::mpsc;
78 VcpuRequest(mpsc::SendError<VcpuControl>),
81 VcpuResponse(mpsc::RecvTimeoutError),
93 vcpu_com: Vec<mpsc::Sender<VcpuControl>>,
94 from_vcpu: mpsc::Receiver<VcpuDebugStatusMessage>,
102 vcpu_com: Vec<mpsc::Sender<VcpuControl>>, in new()
103 from_vcpu: mpsc::Receiver<VcpuDebugStatusMessage>, in new()
/external/rust/crates/futures-executor/src/
Dthread_pool.rs12 use std::sync::mpsc;
49 tx: Mutex<mpsc::Sender<Message>>,
50 rx: Mutex<mpsc::Receiver<Message>>,
267 let (tx, rx) = mpsc::channel(); in create()
368 use std::sync::mpsc;
372 let (tx, rx) = mpsc::sync_channel(2); in test_drop_after_start()
/external/rust/crates/futures-executor/benches/
Dthread_notify.rs71 use std::sync::mpsc; in thread_yield_multi_thread()
76 let (tx, rx) = mpsc::sync_channel::<Waker>(10_000); in thread_yield_multi_thread()
80 tx: mpsc::SyncSender<Waker>, in thread_yield_multi_thread()
/external/rust/crates/tokio-stream/tests/support/
Dmpsc.rs2 use tokio::sync::mpsc::{self, UnboundedSender};
6 let (tx, mut rx) = mpsc::unbounded_channel(); in unbounded_channel_stream()

1234