use std::thread;
use std::sync::mpsc;

fn main() {
    let (tx, rx) = mpsc::channel();

    thread::spawn(move || {
        let val = String::from("Hello there");
        tx.send(val).unwrap();
    });
}

fn main() {
    println!("Hello, world!");
}

--- 
+++ 
@@ -1,3 +1,11 @@
+use std::thread;
+use std::sync::mpsc;
+
 fn main() {
-    println!("Hello, world!");
+    let (tx, rx) = mpsc::channel();
+
+    thread::spawn(move || {
+        let val = String::from("Hello there");
+        tx.send(val).unwrap();
+    });
 }
Create channel and spawn a thread that sends string through it
