diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-01-08 19:46:12 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-01-15 18:00:19 -0800 |
| commit | 090b247056a9dd2d4d4a32c631fe2f0ddd3e744d (patch) | |
| tree | b7b9d7ab483fa7150480f90c9a5ad69905753685 /src/rt/rust_builtin.cpp | |
| parent | 989667e545cb45265d3cb4b19500224459c3bf8c (diff) | |
| download | rust-090b247056a9dd2d4d4a32c631fe2f0ddd3e744d.tar.gz rust-090b247056a9dd2d4d4a32c631fe2f0ddd3e744d.zip | |
Spawn new tasks onto the primary scheduler by default. #3760
Diffstat (limited to 'src/rt/rust_builtin.cpp')
| -rw-r--r-- | src/rt/rust_builtin.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index de69272aca1..cbc58e85db6 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -652,7 +652,10 @@ new_task_common(rust_scheduler *sched, rust_task *parent) { extern "C" CDECL rust_task* new_task() { rust_task *task = rust_get_current_task(); - return new_task_common(task->sched, task); + rust_sched_id sched_id = task->kernel->main_sched_id(); + rust_scheduler *sched = task->kernel->get_scheduler_by_id(sched_id); + assert(sched != NULL && "should always have a main scheduler"); + return new_task_common(sched, task); } extern "C" CDECL rust_task* |
