Skip to content

Commit 25be79d

Browse files
committed
---
yaml --- r: 14651 b: refs/heads/try c: 8e0efce h: refs/heads/master i: 14649: 5c943cb 14647: 13b4fe0 v: v3
1 parent 05b7421 commit 25be79d

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
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: 93fa933a1926f953fa74b9b4908c0e6dc9b0a964
5+
refs/heads/try: 8e0efce0dad2a63fd290918df38a1d7626e6d4b3
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/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

branches/try/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)