[core] extract weak_ptr mailbox->receive into Mailbox::maybeReceive

This commit is contained in:
Mike Morris
2016-10-12 22:32:55 -04:00
parent a894870fb8
commit 7bbd49c72c
5 changed files with 11 additions and 9 deletions

View File

@@ -22,9 +22,7 @@ ThreadPool::ThreadPool(std::size_t count) {
queue.pop();
lock.unlock();
if (auto locked = mailbox.lock()) {
locked->receive();
}
Mailbox::maybeReceive(mailbox);
}
});
}