message: add test for basic threading support
diff: @@ -52,6 +52,25 @@ fn hello() -> bool {
  true
  }
  +fn threading() -> bool {
  + // Make a vector to hold the children which are spawned.
  + let mut children = vec![];
  +
  + for i in 0..2 {
  + // Spin up another thread
  + children.push(thread::spawn(move || {
  + println!("this is thread number {}", i);
  + }));
  + }
  +
  + for child in children {
  + // Wait for the thread to finish. Returns a result.
  + let _ = child.join();
  + }
  +
  + true
  +}
  +
  fn test_result(b: bool) -> &'static str {
  if b == true {
  "ok"
  @@ -62,6 +81,7 @@ fn test_result(b: bool) -> &'static str {
  fn main() {
  println!("Test {} ... {}", stringify!(hello), test_result(hello()));
  + println!("Test {} ... {}", stringify!(threading), test_result(threading()));
  println!("Test {} ... {}", stringify!(pi_sequential), test_result(pi_sequential(50000000)));
  println!("Test {} ... {}", stringify!(pi_parallel), test_result(pi_parallel(2, 50000000)));
  }
  