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-08-20 16:05:18 -0700
committerBrian Anderson <banderson@mozilla.com>2011-08-20 16:21:27 -0700
commitabdb6cd71bdd5b66d42ddfc517c9adf318b17c9f (patch)
tree7d7ec6dc9fe85e96d2b6f52d1ff75a4d0e841d3a /src/rt/rust_task.cpp
parent25416bfae190d68d706b80903e46748da3dfadc4 (diff)
downloadrust-abdb6cd71bdd5b66d42ddfc517c9adf318b17c9f.tar.gz
rust-abdb6cd71bdd5b66d42ddfc517c9adf318b17c9f.zip
Rewrite reap_dead_tasks to never grab the sched lock before a task lock
Doing so contradicts the locking order used everywhere else and causes
deadlocks.

Un-XFAIL task-perf-spawnalot

Closes #854
Diffstat (limited to 'src/rt/rust_task.cpp')
-rw-r--r--src/rt/rust_task.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp
index bd8fe5c38e8..4ce6e44879b 100644
--- a/src/rt/rust_task.cpp
+++ b/src/rt/rust_task.cpp
@@ -90,6 +90,7 @@ rust_task::rust_task(rust_scheduler *sched, rust_task_list *state,
 
 rust_task::~rust_task()
 {
+    I(sched, !sched->lock.lock_held_by_current_thread());
     DLOG(sched, task, "~rust_task %s @0x%" PRIxPTR ", refcnt=%d",
          name, (uintptr_t)this, ref_count);