about summary refs log tree commit diff
path: root/src/rt/rust_builtin.cpp
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-03-04 15:36:32 -0800
committerBrian Anderson <banderson@mozilla.com>2012-03-05 19:39:56 -0800
commit4c4a2320eb9620dbc68a264ce64ee1f233dd977d (patch)
tree906d11b31ca849c4d4a6ef0ca176dd46118e84be /src/rt/rust_builtin.cpp
parent0a5603cb58bdc66ad6b6a030e4e98ebeb3c13721 (diff)
downloadrust-4c4a2320eb9620dbc68a264ce64ee1f233dd977d.tar.gz
rust-4c4a2320eb9620dbc68a264ce64ee1f233dd977d.zip
rt: Make rust_port_detach less contentious
It still utterly dominates some benchmarks with busy waiting, but at least it
doesn't create lock contention while doing so.
Diffstat (limited to 'src/rt/rust_builtin.cpp')
-rw-r--r--src/rt/rust_builtin.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp
index b6ad9397e9c..c37944c3760 100644
--- a/src/rt/rust_builtin.cpp
+++ b/src/rt/rust_builtin.cpp
@@ -492,7 +492,7 @@ extern "C" CDECL void
 del_port(rust_port *port) {
     rust_task *task = rust_task_thread::get_task();
     LOG(task, comm, "del_port(0x%" PRIxPTR ")", (uintptr_t) port);
-    A(task->thread, port->ref_count == 1, "Expected port ref_count == 1");
+    A(task->thread, port->get_ref_count() == 1, "Expected port ref_count == 1");
     port->deref();
 }
 
@@ -522,7 +522,6 @@ chan_id_send(type_desc *t, rust_task_id target_task_id,
         rust_port *port = target_task->get_port_by_id(target_port_id);
         if(port) {
             port->send(sptr);
-            scoped_lock with(target_task->port_lock);
             port->deref();
             sent = true;
         } else {