about summary refs log tree commit diff
path: root/src/rt/rust_port.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-03-03 20:50:11 -0800
committerBrian Anderson <banderson@mozilla.com>2012-03-05 19:39:56 -0800
commit0a5603cb58bdc66ad6b6a030e4e98ebeb3c13721 (patch)
tree1092b7474081dfc2de16104edf9131e06a3b7329 /src/rt/rust_port.cpp
parentcc276fe3c96965ba39b9fba3b588a1eaa3941d86 (diff)
downloadrust-0a5603cb58bdc66ad6b6a030e4e98ebeb3c13721.tar.gz
rust-0a5603cb58bdc66ad6b6a030e4e98ebeb3c13721.zip
rt: Make linked failure less prone to deadlock
Still a mess.
Diffstat (limited to 'src/rt/rust_port.cpp')
-rw-r--r--src/rt/rust_port.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/rt/rust_port.cpp b/src/rt/rust_port.cpp
index 41884f8f60c..bbfa737adec 100644
--- a/src/rt/rust_port.cpp
+++ b/src/rt/rust_port.cpp
@@ -88,6 +88,11 @@ void rust_port::receive(void *dptr, uintptr_t *yield) {
     task->rendezvous_ptr = (uintptr_t*) dptr;
     task->block(this, "waiting for rendezvous data");
 
+    // Blocking the task might fail if the task has already been killed, but
+    // in the event of both failure and success the task needs to yield. On
+    // success, it yields and waits to be unblocked. On failure it yields and
+    // is then fails the task.
+
     *yield = true;
 }