Skip to content

Commit

Permalink
slightly improve wakeup logic
Browse files Browse the repository at this point in the history
  • Loading branch information
MikkelSchubert committed Jul 15, 2024
1 parent 12a5f01 commit a956a5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scheduler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,9 @@ scheduler::run_io_loop()
m_tasks--;

// Queue additional read tasks
m_condition_calc.notify_one();
if (!m_queue_calc.empty() || m_tasks < m_tasks_max) {
m_condition_calc.notify_one();
}
}

m_condition_io.notify_all();
Expand Down

0 comments on commit a956a5d

Please sign in to comment.