We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e3ccac8 commit 93fa933Copy full SHA for 93fa933
src/rt/rust_port.cpp
@@ -21,11 +21,7 @@ rust_port::~rust_port() {
21
}
22
23
void rust_port::detach() {
24
- I(task->thread, !task->port_lock.lock_held_by_current_thread());
25
- scoped_lock with(task->port_lock);
26
- {
27
- task->release_port(id);
28
- }
+ task->release_port(id);
29
30
31
void rust_port::send(void *sptr) {
src/rt/rust_task.cpp
@@ -481,7 +481,7 @@ rust_port_id rust_task::register_port(rust_port *port) {
481
482
483
void rust_task::release_port(rust_port_id id) {
484
- I(thread, port_lock.lock_held_by_current_thread());
+ scoped_lock with(port_lock);
485
port_table.remove(id);
486
487
0 commit comments