mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-02 02:07:54 +00:00
First version of caching in media streaming.
This commit is contained in:
@@ -176,6 +176,14 @@ void Database::clearByTag(uint8 tag, FnMut<void(Error)> &&done) {
|
||||
});
|
||||
}
|
||||
|
||||
void Database::sync() {
|
||||
auto semaphore = crl::semaphore();
|
||||
_wrapped.with([&](Implementation &) {
|
||||
semaphore.release();
|
||||
});
|
||||
semaphore.acquire();
|
||||
}
|
||||
|
||||
Database::~Database() = default;
|
||||
|
||||
} // namespace Cache
|
||||
|
||||
Reference in New Issue
Block a user