This commit is contained in:
J. Nick Koston 2025-07-04 10:01:00 -05:00
parent 71f78e3a81
commit 4649599592
No known key found for this signature in database

View File

@ -226,9 +226,10 @@ void HOT Scheduler::call() {
// - No deferred items exist in to_add_, so processing order doesn't affect correctness
while (!this->defer_queue_.empty()) {
this->lock_.lock();
if (this->defer_queue_.empty()) // Double-check with lock held
if (this->defer_queue_.empty()) { // Double-check with lock held
this->lock_.unlock();
break;
break;
}
auto item = std::move(this->defer_queue_.front());
this->defer_queue_.pop_front();
this->lock_.unlock();