Avoid adding worker during workqueue enqueueing

This commit is contained in:
Chen Chengjun
2024-11-01 10:13:41 +08:00
committed by Tate, Hongliang Tian
parent 7e2e9cebf6
commit 2ac6e0e126

View File

@ -142,9 +142,7 @@ impl WorkQueue {
.lock()
.pending_work_items
.push(work_item);
if let Some(worker_pool) = self.worker_pool.upgrade() {
worker_pool.schedule()
}
true
}