Home
last modified time | relevance | path

Searched refs:try_send (Results 1 – 22 of 22) sorted by relevance

/external/rust/crates/tokio/tests/
Dsync_mpsc.rs34 tx.try_send(2).unwrap(); in send_recv_with_buffer()
125 assert_ok!(tx1.try_send(())); in start_send_past_cap()
213 assert!(tx.clone().try_send(NoImpls).is_ok()); in no_t_bounds_buffer()
255 assert_err!(tx.try_send(1337)); in send_recv_buffer_limited()
313 tx.try_send("hello").unwrap(); in try_send_fail()
316 match assert_err!(tx.try_send("fail")) { in try_send_fail()
323 assert_ok!(tx.try_send("goodbye")); in try_send_fail()
376 assert_ok!(tx.try_send(msg.clone())); in dropping_rx_closes_channel()
388 tx.try_send(msg.clone()).unwrap(); in dropping_rx_closes_channel_for_try()
393 let err = assert_err!(tx.try_send(msg.clone())); in dropping_rx_closes_channel_for_try()
[all …]
Dudp.rs255 let sent = &sender.try_send(MSG2).unwrap(); in try_send_spawn()
260 let sent = &sender.try_send(MSG).unwrap(); in try_send_spawn()
286 match client.try_send(b"hello world") { in try_send_recv()
373 match client.try_send(b"hello world") { in try_recv_buf()
Duds_datagram.rs89 match dgram1.try_send(payload) { in try_send_recv_never_block()
293 match dgram1.try_send(payload) { in try_recv_buf_never_block()
/external/rust/crates/crossbeam-channel/tests/
Dready.rs215 Ok(0) => assert_eq!(s.try_send(0), Err(TrySendError::Disconnected(0))), in default_when_disconnected()
224 Ok(0) => assert_eq!(s.try_send(0), Err(TrySendError::Disconnected(0))), in default_when_disconnected()
307 1 => s2.try_send(2).unwrap(), in both_ready()
438 assert!(s.try_send(0).is_ok()); in duplicate_operations()
442 assert!(s.try_send(0).is_ok()); in duplicate_operations()
458 assert!(s.try_send(0).is_ok()); in nesting()
470 assert!(s.try_send(1).is_ok()); in nesting()
551 0 => assert!(s1.try_send(i).is_ok()), in stress_send()
552 1 => assert!(s2.try_send(i).is_ok()), in stress_send()
586 1 => assert!(s2.try_send(i).is_ok()), in stress_mixed()
[all …]
Dzero.rs22 assert_eq!(s.try_send(7), Err(TrySendError::Full(7))); in smoke()
123 fn try_send() { in try_send() function
128 assert_eq!(s.try_send(7), Err(TrySendError::Full(7))); in try_send()
130 assert_eq!(s.try_send(8), Ok(())); in try_send()
132 assert_eq!(s.try_send(9), Err(TrySendError::Disconnected(9))); in try_send()
336 let _ = request_s.try_send(()); in stress_iter()
Dlist.rs22 s.try_send(7).unwrap(); in smoke()
134 fn try_send() { in try_send() function
137 assert_eq!(s.try_send(i), Ok(())); in try_send()
141 assert_eq!(s.try_send(777), Err(TrySendError::Disconnected(777))); in try_send()
180 assert_eq!(s.try_send(5), Err(TrySendError::Disconnected(5))); in send_after_disconnect()
412 s.try_send(DropCounter).unwrap(); in drops()
Darray.rs145 fn try_send() { in try_send() function
150 assert_eq!(s.try_send(1), Ok(())); in try_send()
151 assert_eq!(s.try_send(2), Err(TrySendError::Full(2))); in try_send()
153 assert_eq!(s.try_send(3), Ok(())); in try_send()
155 assert_eq!(s.try_send(4), Err(TrySendError::Disconnected(4))); in try_send()
230 assert_eq!(s.try_send(5), Err(TrySendError::Disconnected(5))); in send_after_disconnect()
Dmpsc.rs57 pub fn try_send(&self, t: T) -> Result<(), TrySendError<T>> { in try_send() method
58 self.inner.try_send(t).map_err(|err| match err { in try_send()
1241 assert_eq!(tx.try_send(10), Ok(())); in oneshot_single_thread_try_send_open()
1249 assert_eq!(tx.try_send(10), Err(TrySendError::Disconnected(10))); in oneshot_single_thread_try_send_closed()
1255 assert_eq!(tx.try_send(10), Err(TrySendError::Full(10))); in oneshot_single_thread_try_send_closed2()
1524 let _ = tx.try_send(2); in test_recv_iter_break()
1636 assert_eq!(tx.try_send(1), Err(TrySendError::Full(1))); in try_send1()
1642 assert_eq!(tx.try_send(1), Ok(())); in try_send2()
1643 assert_eq!(tx.try_send(1), Err(TrySendError::Full(1))); in try_send2()
1649 assert_eq!(tx.try_send(1), Ok(())); in try_send3()
[all …]
Dselect_macro.rs1309 fn try_send() { in try_send() function
/external/rust/crates/futures-channel/tests/
Dmpsc.rs438 if tx.try_send(i).is_ok() { in try_send_1()
458 tx.try_send("hello").unwrap(); in try_send_2()
485 tx.try_send("hello").unwrap(); in try_send_fail()
488 assert!(tx.try_send("fail").is_err()); in try_send_fail()
492 tx.try_send("goodbye").unwrap(); in try_send_fail()
502 tx.try_send("hello").unwrap(); in try_send_recv()
503 tx.try_send("hello").unwrap(); in try_send_recv()
504 tx.try_send("hello").unwrap_err(); // should be full in try_send_recv()
508 tx.try_send("hello").unwrap(); in try_send_recv()
Dmpsc-close.rs134 sender.try_send(ref_count).expect("failed to send"); in single_receiver_drop_closes_channel_and_drains()
228 cmd_tx.try_send(TestRx { rx, poll_count }).unwrap(); in stress_try_send_as_receiver_closes()
236 match test_tx.try_send(item) { in stress_try_send_as_receiver_closes()
/external/rust/crates/tokio/src/sync/tests/
Dloom_mpsc.rs15 tx.try_send(()).unwrap(); in closing_tx()
67 tx1.try_send(()).unwrap(); in closing_and_sending()
/external/rust/crates/futures-channel/src/mpsc/
Dmod.rs516 fn try_send(&mut self, msg: T) -> Result<(), TrySendError<T>> { in try_send() method
723 pub fn try_send(&mut self, msg: T) -> Result<(), TrySendError<T>> { in try_send() method
725 inner.try_send(msg) in try_send()
742 self.try_send(msg) in start_send()
/external/rust/crates/crossbeam-channel/src/
Dchannel.rs390 pub fn try_send(&self, msg: T) -> Result<(), TrySendError<T>> { in try_send() method
392 SenderFlavor::Array(chan) => chan.try_send(msg), in try_send()
393 SenderFlavor::List(chan) => chan.try_send(msg), in try_send()
394 SenderFlavor::Zero(chan) => chan.try_send(msg), in try_send()
/external/rust/crates/tokio/src/sync/mpsc/
Dbounded.rs450 pub fn try_send(&self, message: T) -> Result<(), TrySendError<T>> { in try_send() method
/external/rust/crates/crossbeam-channel/
DCHANGELOG.md141 - Remove `Sender::try_send`.
/external/rust/crates/tokio/src/net/unix/datagram/
Dsocket.rs562 pub fn try_send(&self, buf: &[u8]) -> io::Result<usize> { in try_send() method
/external/rust/crates/crossbeam-channel/src/flavors/
Dzero.rs186 pub fn try_send(&self, msg: T) -> Result<(), TrySendError<T>> { in try_send() method
Darray.rs335 pub fn try_send(&self, msg: T) -> Result<(), TrySendError<T>> { in try_send() method
Dlist.rs408 pub fn try_send(&self, msg: T) -> Result<(), TrySendError<T>> { in try_send() method
/external/rust/crates/tokio/src/net/
Dudp.rs547 pub fn try_send(&self, buf: &[u8]) -> io::Result<usize> { in try_send() method
/external/crosvm/devices/src/virtio/
Dballoon.rs264 if let Err(e) = stats_tx.try_send(()) { in handle_command_tube()