[core] extract weak_ptr mailbox->receive into Mailbox::maybeReceive
This commit is contained in:
@@ -22,9 +22,7 @@ ThreadPool::ThreadPool(std::size_t count) {
|
||||
queue.pop();
|
||||
lock.unlock();
|
||||
|
||||
if (auto locked = mailbox.lock()) {
|
||||
locked->receive();
|
||||
}
|
||||
Mailbox::maybeReceive(mailbox);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user