Skip to content

Commit 35e9970

Browse files
committed
rt: Ports don't need to ref their tasks
Port lifetime is always bounded by their owning task
1 parent 5728a69 commit 35e9970

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

src/rt/rust_port.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@ rust_port::rust_port(rust_task *task, size_t unit_sz)
1010
"new rust_port(task=0x%" PRIxPTR ", unit_sz=%d) -> port=0x%"
1111
PRIxPTR, (uintptr_t)task, unit_sz, (uintptr_t)this);
1212

13-
task->ref();
1413
id = kernel->register_port(this);
1514
}
1615

1716
rust_port::~rust_port() {
1817
LOG(task, comm, "~rust_port 0x%" PRIxPTR, (uintptr_t) this);
19-
20-
task->deref();
2118
}
2219

2320
void rust_port::ref() {

0 commit comments

Comments
 (0)