From f4ce965ce70f7f7ffa62df721d083cb3eafeb19d Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Fri, 2 Mar 2012 15:51:47 -0800 Subject: [PATCH] rt: Port ref counts are protected by the task lock. Ick. --- src/rt/rust_builtin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index cacae7259ca..05295bcd1a9 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -511,7 +511,7 @@ rust_port_detach(rust_port *port) { // FIXME: Busy waiting until we're the only ref bool done = false; while (!done) { - scoped_lock with(port->lock); + scoped_lock with(task->lock); done = port->ref_count == 1; } }