Skip to content

Commit 1e84ff4

Browse files
committed
---
yaml --- r: 11645 b: refs/heads/master c: 8e0efce h: refs/heads/master i: 11643: 51e21c7 v: v3
1 parent 203f82d commit 1e84ff4

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 93fa933a1926f953fa74b9b4908c0e6dc9b0a964
2+
refs/heads/master: 8e0efce0dad2a63fd290918df38a1d7626e6d4b3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rt/rust_builtin.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -486,12 +486,6 @@ rust_port_detach(rust_port *port) {
486486
rust_task *task = rust_task_thread::get_task();
487487
LOG(task, comm, "rust_port_detach(0x%" PRIxPTR ")", (uintptr_t) port);
488488
port->detach();
489-
// FIXME: Busy waiting until we're the only ref
490-
bool done = false;
491-
while (!done) {
492-
scoped_lock with(task->port_lock);
493-
done = port->ref_count == 1;
494-
}
495489
}
496490

497491
extern "C" CDECL void

trunk/src/rt/rust_port.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ rust_port::~rust_port() {
2222

2323
void rust_port::detach() {
2424
task->release_port(id);
25+
// FIXME: Busy waiting until we're the only ref
26+
bool done = false;
27+
while (!done) {
28+
scoped_lock with(task->port_lock);
29+
done = ref_count == 1;
30+
}
2531
}
2632

2733
void rust_port::send(void *sptr) {

0 commit comments

Comments
 (0)