Skip to content

Commit f4ce965

Browse files
committed
rt: Port ref counts are protected by the task lock. Ick.
1 parent 3d991ba commit f4ce965

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rt/rust_builtin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ rust_port_detach(rust_port *port) {
511511
// FIXME: Busy waiting until we're the only ref
512512
bool done = false;
513513
while (!done) {
514-
scoped_lock with(port->lock);
514+
scoped_lock with(task->lock);
515515
done = port->ref_count == 1;
516516
}
517517
}

0 commit comments

Comments
 (0)