diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-06-15 19:31:46 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-06-15 19:31:46 -0700 |
| commit | 3208fc36bf2c7e99451e21171f82dafef2ea51dc (patch) | |
| tree | 0ac94c64e1601824d3e326964580a3b84295737a /src/libstd/rt/mod.rs | |
| parent | b08c4467980bc712995d421dd50c1cca2948b67b (diff) | |
| parent | 505ef7e710ff890c0027fadad54997041b7ee93b (diff) | |
| download | rust-3208fc36bf2c7e99451e21171f82dafef2ea51dc.tar.gz rust-3208fc36bf2c7e99451e21171f82dafef2ea51dc.zip | |
Merge remote-tracking branch 'brson/io-wip' into io
Conflicts: src/libstd/rt/sched.rs src/libstd/rt/task.rs src/libstd/rt/test.rs src/libstd/task/mod.rs src/libstd/task/spawn.rs
Diffstat (limited to 'src/libstd/rt/mod.rs')
| -rw-r--r-- | src/libstd/rt/mod.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 3198b285876..5f06c1455a4 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -133,6 +133,9 @@ pub mod local_ptr; /// Bindings to pthread/windows thread-local storage. pub mod thread_local_storage; +/// A concurrent data structure with which parent tasks wait on child tasks. +pub mod join_latch; + pub mod metrics; @@ -164,7 +167,7 @@ pub fn start(_argc: int, _argv: **u8, crate_map: *u8, main: ~fn()) -> int { let sleepers = SleeperList::new(); let mut sched = ~Scheduler::new(loop_, work_queue, sleepers); sched.no_sleep = true; - let main_task = ~Coroutine::new(&mut sched.stack_pool, main); + let main_task = ~Coroutine::new_root(&mut sched.stack_pool, main); sched.enqueue_task(main_task); sched.run(); @@ -238,7 +241,7 @@ fn test_context() { do run_in_bare_thread { assert_eq!(context(), GlobalContext); let mut sched = ~new_test_uv_sched(); - let task = ~do Coroutine::new(&mut sched.stack_pool) { + let task = ~do Coroutine::new_root(&mut sched.stack_pool) { assert_eq!(context(), TaskContext); let sched = Local::take::<Scheduler>(); do sched.deschedule_running_task_and_then() |sched, task| { |
