Skip to content

Commit 79368fe

Browse files
committed
Fix a use-after-free/data-race in run_loop/sync_wait
1 parent c437677 commit 79368fe

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

include/beman/execution/detail/run_loop.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,8 @@ class run_loop {
175175
}
176176
}
177177
auto finish() -> void {
178-
{
179-
::std::lock_guard guard(this->mutex);
180-
this->current_state = state::finishing;
181-
}
178+
::std::lock_guard guard(this->mutex);
179+
this->current_state = state::finishing;
182180
this->condition.notify_one();
183181
}
184182
};

0 commit comments

Comments
 (0)