[core] extract weak_ptr mailbox->receive into Mailbox::maybeReceive
This commit is contained in:
@@ -52,4 +52,10 @@ void Mailbox::receive() {
|
||||
}
|
||||
}
|
||||
|
||||
void Mailbox::maybeReceive(std::weak_ptr<Mailbox> mailbox) {
|
||||
if (auto locked = mailbox.lock()) {
|
||||
locked->receive();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user