about summary refs log tree commit diff
path: root/src/rt/rust_task_thread.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-02-04 14:54:10 -0800
committerBrian Anderson <banderson@mozilla.com>2012-02-08 15:33:40 -0800
commitf39e64d56ab4929be5985d4a64020d2223706d96 (patch)
tree0c3c810c87372216986d47eadd9476a0d9150117 /src/rt/rust_task_thread.cpp
parent6eafe5d772131c644a40ae1013a6016dcba037c4 (diff)
downloadrust-f39e64d56ab4929be5985d4a64020d2223706d96.tar.gz
rust-f39e64d56ab4929be5985d4a64020d2223706d96.zip
rt: Change the scheme used for terminating the kernel
Instead of joining on the scheduler threads, instead keep a count of active
schedulers. When there are no more schedulers raise a signal for the main
thread to continue.

This will be required once schedulers can be added and removed from the
running kernel.
Diffstat (limited to 'src/rt/rust_task_thread.cpp')
-rw-r--r--src/rt/rust_task_thread.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rt/rust_task_thread.cpp b/src/rt/rust_task_thread.cpp
index a3bf729ad2f..6251d5c24c1 100644
--- a/src/rt/rust_task_thread.cpp
+++ b/src/rt/rust_task_thread.cpp
@@ -296,6 +296,7 @@ rust_task_thread::create_task(rust_task *spawner, const char *name,
 
 void rust_task_thread::run() {
     this->start_main_loop();
+    sched->release_task_thread();
 }
 
 #ifndef _WIN32