Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
threads-sendsync
/
trivial-message.rs
blob: d76ba0009dca2ea230f23fbe5135b33b1a75d486 [
file
] [
log
] [
blame
] [
edit
]
//@ run-pass
#![
allow
(
unused_must_use
)]
/*
This is about the simplest program that can successfully send a
message.
*/
use
std
::
sync
::
mpsc
::
channel
;
pub
fn
main
()
{
let
(
tx
,
rx
)
=
channel
();
tx
.
send
(
42
);
let
r
=
rx
.
recv
();
println
!(
"{:?}"
,
r
);
}