mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
[fix] need double check for task queue
This commit is contained in:
@@ -104,6 +104,8 @@ class TaskQueue {
|
|||||||
[this]() { return stop_; });
|
[this]() { return stop_; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (stop_ && taskQueue_.empty()) return;
|
||||||
|
|
||||||
task = std::move(
|
task = std::move(
|
||||||
const_cast<AnyInvocable<void()> &>(taskQueue_.top().task));
|
const_cast<AnyInvocable<void()> &>(taskQueue_.top().task));
|
||||||
taskQueue_.pop();
|
taskQueue_.pop();
|
||||||
|
|||||||
Reference in New Issue
Block a user