]> git.lizzy.rs Git - rust.git/blob - src/test/ui/threads-sendsync/issue-4446.rs
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
[rust.git] / src / test / ui / threads-sendsync / issue-4446.rs
1 // run-pass
2 // ignore-emscripten no threads support
3
4 use std::sync::mpsc::channel;
5 use std::thread;
6
7 pub fn main() {
8     let (tx, rx) = channel();
9
10     tx.send("hello, world").unwrap();
11
12     thread::spawn(move|| {
13         println!("{}", rx.recv().unwrap());
14     }).join().ok().unwrap();
15 }