// xfail-stage0
// -*- rust -*-
use std;
import std::task::*;
fn main() {
auto other = spawn child();
log_err "1";
yield();
join(other);
}
fn child() {
log_err "2";
}
// xfail-stage0
// -*- rust -*-
use std;
import std::task::*;
fn main() { auto other = spawn child(); log_err "1"; yield(); join(other); }
fn child() { log_err "2"; }
// xfail-stage0
// -*- rust -*-
use std;
import std::task::*;
fn main() { let other = spawn child(); log_err "1"; yield(); join(other); }
fn child() { log_err "2"; }
// -*- rust -*-
use std;
import std::task::*;
fn main() { let other = spawn child(); log_err "1"; yield(); join(other); }
fn child() { log_err "2"; }
// -*- rust -*-
use std;
import std::task;
import std::task::*;
fn main() {
let other = task::_spawn(bind child());
log_err "1"; yield();
join_id(other);
}
fn child() { log_err "2"; }
// -*- rust -*-
use std;
import std::task;
import std::task::*;
fn main() {
let c = child;
let other = task::spawn(c);
log_err "1"; yield();
join_id(other);
}
fn child() { log_err "2"; }
// -*- rust -*-
use std;
import std::task;
import std::task::*;
fn main() {
let c = child;
let other = task::spawn(c);
log_err "1";
yield();
join_id(other);
}
fn child() { log_err "2"; }
// -*- rust -*-
use std;
import std::task;
import std::task::*;
fn main() {
let c = child;
let other = task::spawn_joinable(c);
log_err "1";
yield();
join(other);
}
fn child() { log_err "2"; }
// -*- rust -*-
use std;
import std::task;
import std::task::*;
fn main() {
let other = task::spawn_joinable2((), child);
log_err "1";
yield();
join(other);
}
fn# child(&&_i: ()) { log_err "2"; }
// -*- rust -*-
use std;
import std::task;
import std::task::*;
fn main() {
let other = task::spawn_joinable((), child);
log_err "1";
yield();
join(other);
}
fn# child(&&_i: ()) { log_err "2"; }
// -*- rust -*-
use std;
import std::task;
import std::task::*;
fn main() {
let other = task::spawn_joinable((), child);
log_err "1";
yield();
join(other);
}
fn child(&&_i: ()) { log_err "2"; }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let other = task::spawn_joinable((), child);
log_err "1";
yield();
join(other);
}
fn child(&&_i: ()) { log_err "2"; }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let other = task::spawn_joinable((), child);
#error("1");
yield();
join(other);
}
fn child(&&_i: ()) { #error("2"); }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let other = task::spawn_joinable {|| child(); };
#error("1");
yield();
join(other);
}
fn child() { #error("2"); }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let builder = task::mk_task_builder();
let result = task::future_result(builder);
task::run(builder) {|| child(); }
#error("1");
yield();
future::get(result);
}
fn child() { #error("2"); }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let builder = task::task_builder();
let result = task::future_result(builder);
task::run(builder) {|| child(); }
#error("1");
yield();
future::get(result);
}
fn child() { #error("2"); }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let builder = task::builder();
let result = task::future_result(builder);
task::run(builder) {|| child(); }
#error("1");
yield();
future::get(result);
}
fn child() { #error("2"); }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let builder = task::builder();
let result = task::future_result(builder);
task::run(builder, {|| child(); });
#error("1");
yield();
future::get(result);
}
fn child() { #error("2"); }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let builder = task::builder();
let result = task::future_result(builder);
task::run(builder, || child() );
#error("1");
yield();
future::get(result);
}
fn child() { #error("2"); }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let mut result = none;
task::task().future_result(|-r| { result = some(r); }).spawn(child);
#error("1");
yield();
future::get(option::unwrap(result));
}
fn child() { #error("2"); }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let mut result = none;
task::task().future_result(|-r| { result = some(r); }).spawn(child);
error!{"1"};
yield();
future::get(option::unwrap(result));
}
fn child() { error!{"2"}; }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let mut result = none;
task::task().future_result(|+r| { result = some(r); }).spawn(child);
error!{"1"};
yield();
future::get(option::unwrap(result));
}
fn child() { error!{"2"}; }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let mut result = none;
task::task().future_result(|+r| { result = some(r); }).spawn(child);
error!{"1"};
yield();
future::get(&option::unwrap(result));
}
fn child() { error!{"2"}; }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let mut result = none;
task::task().future_result(|+r| { result = some(r); }).spawn(child);
error!("1");
yield();
future::get(&option::unwrap(result));
}
fn child() { error!("2"); }
// -*- rust -*-
use std;
import task;
import task::*;
fn main() {
let mut result = None;
task::task().future_result(|+r| { result = Some(r); }).spawn(child);
error!("1");
yield();
future::get(&option::unwrap(result));
}
fn child() { error!("2"); }
// -*- rust -*-
use std;
use task::*;
fn main() {
let mut result = None;
task::task().future_result(|+r| { result = Some(r); }).spawn(child);
error!("1");
yield();
future::get(&option::unwrap(result));
}
fn child() { error!("2"); }
// -*- rust -*-
extern mod std;
use task::*;
fn main() {
let mut result = None;
task::task().future_result(|+r| { result = Some(r); }).spawn(child);
error!("1");
yield();
future::get(&option::unwrap(result));
}
fn child() { error!("2"); }
// -*- rust -*-
extern mod std;
use task::*;
fn main() {
let mut result = None;
task::task().future_result(|+r| { result = Some(move r); }).spawn(child);
error!("1");
yield();
future::get(&option::unwrap(move result));
}
fn child() { error!("2"); }
// -*- rust -*-
extern mod std;
use task::*;
fn main() {
let mut result = None;
task::task().future_result(|+r| { result = Some(move r); }).spawn(child);
error!("1");
yield();
option::unwrap(move result).recv();
}
fn child() { error!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
extern mod std;
use task::*;
fn main() {
let mut result = None;
task::task().future_result(|+r| { result = Some(move r); }).spawn(child);
error!("1");
yield();
option::unwrap(move result).recv();
}
fn child() { error!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
fn main() {
let mut result = None;
task::task().future_result(|+r| { result = Some(move r); }).spawn(child);
error!("1");
task::yield();
option::unwrap(move result).recv();
}
fn child() { error!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
pub fn main() {
let mut result = None;
task::task().future_result(|+r| { result = Some(move r); }).spawn(child);
error!("1");
task::yield();
option::unwrap(move result).recv();
}
fn child() { error!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
pub fn main() {
let mut result = None;
task::task().future_result(|+r| { result = Some(r); }).spawn(child);
error!("1");
task::yield();
option::unwrap(result).recv();
}
fn child() { error!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
pub fn main() {
let mut result = None;
task::task().future_result(|+r| { result = Some(r); }).spawn(child);
error!("1");
task::yield();
result.unwrap().recv();
}
fn child() { error!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
pub fn main() {
let mut result = None;
let mut builder = task::task();
builder.future_result(|+r| { result = Some(r); });
builder.spawn(child);
error!("1");
task::yield();
result.unwrap().recv();
}
fn child() { error!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
pub fn main() {
let mut result = None;
let mut builder = task::task();
builder.future_result(|r| { result = Some(r); });
builder.spawn(child);
error!("1");
task::yield();
result.unwrap().recv();
}
fn child() { error!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::task;
pub fn main() {
let mut result = None;
let mut builder = task::task();
builder.future_result(|r| { result = Some(r); });
builder.spawn(child);
error!("1");
task::yield();
result.unwrap().recv();
}
fn child() { error!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::task;
pub fn main() {
let mut result = None;
let mut builder = task::task();
builder.future_result(|r| { result = Some(r); });
builder.spawn(child);
error!("1");
task::deschedule();
result.unwrap().recv();
}
fn child() { error!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::task;
pub fn main() {
let mut result = None;
let mut builder = task::task();
builder.future_result(|r| { result = Some(r); });
builder.spawn(child);
error2!("1");
task::deschedule();
result.unwrap().recv();
}
fn child() { error2!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::task;
pub fn main() {
let mut builder = task::task();
let result = builder.future_result();
builder.spawn(child);
error2!("1");
task::deschedule();
result.recv();
}
fn child() { error2!("2"); }
// -*- rust -*-
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::task;
pub fn main() {
let mut builder = task::task();
let result = builder.future_result();
builder.spawn(child);
error!("1");
task::deschedule();
result.recv();
}
fn child() { error!("2"); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::task;
pub fn main() {
let mut builder = task::task();
let result = builder.future_result();
builder.spawn(child);
error!("1");
task::deschedule();
result.recv();
}
fn child() { error!("2"); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::task;
pub fn main() {
let mut builder = task::task();
let mut result = builder.future_result();
builder.spawn(child);
error!("1");
task::deschedule();
result.recv();
}
fn child() { error!("2"); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::task;
pub fn main() {
let mut builder = task::task();
let mut result = builder.future_result();
builder.spawn(child);
println!("1");
task::deschedule();
result.recv();
}
fn child() { println!("2"); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::task;
use std::task::TaskBuilder;
pub fn main() {
let mut builder = TaskBuilder::new();
let mut result = builder.future_result();
builder.spawn(child);
println!("1");
task::deschedule();
result.recv();
}
fn child() { println!("2"); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::task;
pub fn main() {
let mut result = task::try_future(child);
println!("1");
task::deschedule();
result.unwrap();
}
fn child() { println!("2"); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::thread::Thread;
pub fn main() {
let mut result = Thread::spawn(child);
println!("1");
Thread::yield_now();
result.join();
}
fn child() { println!("2"); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::thread::Thread;
pub fn main() {
let mut result = Thread::scoped(child);
println!("1");
Thread::yield_now();
result.join();
}
fn child() { println!("2"); }
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use std::thread;
pub fn main() {
let mut result = thread::spawn(child);
println!("1");
thread::yield_now();
result.join();
}
fn child() { println!("2"); }