small one-line
This commit is contained in:
parent
27da8b7df0
commit
c0ba14764a
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user