2018-08-30 14:18:55 +02:00
|
|
|
// run-pass
|
2016-02-11 12:34:41 +01:00
|
|
|
// ignore-emscripten no threads support
|
|
|
|
|
2015-02-17 15:24:34 -08:00
|
|
|
use std::thread;
|
2011-08-11 10:46:57 -07:00
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2015-02-17 15:24:34 -08:00
|
|
|
thread::spawn(move|| child(10)).join().ok().unwrap();
|
2012-01-04 21:14:53 -08:00
|
|
|
}
|
2011-06-15 11:19:50 -07:00
|
|
|
|
2015-06-07 21:00:38 +03:00
|
|
|
fn child(i: isize) { println!("{}", i); assert_eq!(i, 10); }
|