about summary refs log tree commit diff
path: root/src/rt/rust_task.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-11-17 17:33:54 -0800
committerBrian Anderson <banderson@mozilla.com>2011-11-18 10:32:27 -0800
commit93931311ff1d034ef92e35f36c900bbd74176179 (patch)
tree46fe1c8d019ac377e41a64a18a71c739606665b4 /src/rt/rust_task.cpp
parent0dfa1410d3bbe6eb30e2e97b8eeb2b403ac25660 (diff)
downloadrust-93931311ff1d034ef92e35f36c900bbd74176179.tar.gz
rust-93931311ff1d034ef92e35f36c900bbd74176179.zip
rt: Add FIXMEs about races in rust_task
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index a152ecb8d3b..b2d9c4d64cd 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -278,6 +278,10 @@ rust_task::yield(size_t time_in_us) {
         unblock();
         fail();
     }
+
+    // FIXME: If we are blocked, and get killed right here then we may never
+    // know it.
+
     yield_timer.reset_us(time_in_us);
 
     // Return to the scheduler.
@@ -468,8 +472,11 @@ rust_task::die() {
 
 void
 rust_task::unblock() {
-    if (blocked())
+    if (blocked()) {
+        // FIXME: What if another thread unblocks the task between when
+        // we checked and here?
         wakeup(cond);
+    }
 }
 
 rust_crate_cache *