Skip to content

Commit

Permalink
Don't make idle tasks when shutting down
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Aug 7, 2024
1 parent 343e90e commit 1afca14
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/threading/scheduler/Pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace threading {

Pool::Task Pool::get_idle_task() {
// If this pool does not count for idle, it can't participate in idle tasks
if (!descriptor.counts_for_idle) {
if (!running.load(std::memory_order_relaxed) || !descriptor.counts_for_idle) {
return Task{nullptr, nullptr};
}

Expand Down

0 comments on commit 1afca14

Please sign in to comment.