2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-08 02:15:56 +00:00

Accept binary_guard in crl::guard().

This commit is contained in:
John Preston
2019-02-17 15:52:57 +04:00
parent 4d987f7278
commit d208236994
8 changed files with 30 additions and 36 deletions

View File

@@ -92,10 +92,7 @@ void Databases::destroy(Cache::Database *database) {
kept.destroying = std::move(first);
database->close();
database->waitForCleaner([=, guard = std::move(second)]() mutable {
crl::on_main([=, guard = std::move(guard)]{
if (!guard) {
return;
}
crl::on_main(std::move(guard), [=] {
_map.erase(path);
});
});