Skip to content

Commit

Permalink
bugfix: lost wakeup
Browse files Browse the repository at this point in the history
  • Loading branch information
8sileus committed May 8, 2024
1 parent 35d9577 commit 8eff804
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion zedio/runtime/multi_thread/idle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class IdleState {

[[nodiscard]]
auto num_working_and_searching(std::memory_order order) -> std::pair<std::size_t, std::size_t> {
auto state = state_.load(order);
auto state = state_.fetch_add(0, order);
return {(state & WORKING_MASK) >> WORKING_SHIFT, state & SEARCHING_MASK};
}

Expand Down

0 comments on commit 8eff804

Please sign in to comment.