small one-line

This commit is contained in:
Simon Quigley 2025-01-25 17:18:42 -06:00
parent 27da8b7df0
commit c0ba14764a

View File

@ -89,10 +89,7 @@ void TaskQueue::worker_thread() {
std::shared_ptr<Task> task_to_execute; std::shared_ptr<Task> task_to_execute;
{ {
std::lock_guard<std::mutex> tasks_lock(tasks_mutex_); std::lock_guard<std::mutex> tasks_lock(tasks_mutex_);
if (stop_ && tasks_.empty()) return;
if (stop_ && tasks_.empty()) {
return; // Exit thread if stopping and no tasks left
}
auto it = tasks_.begin(); auto it = tasks_.begin();
bool found_valid = false; bool found_valid = false;