MCPcopy Create free account
hub / github.com/Snapchat/Valdi / removeAll

Method removeAll

valdi/src/valdi/runtime/JavaScript/Modules/PersistentStore.cpp:142–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void PersistentStore::removeAll(Function<void(Result<Void>)> completion) {
143 _dispatchQueue->async([self = strongRef(this), completion = std::move(completion)]() {
144 self->_store.removeAll();
145 self->scheduleSave(completion);
146 });
147}
148
149void PersistentStore::scheduleSave(Function<void(Result<Void>)> completion) {
150 auto wasEmpty = _pendingSaves.empty();

Callers

nothing calls this directly

Calls 4

scheduleSaveMethod · 0.95
strongRefFunction · 0.85
removeAllMethod · 0.65
asyncMethod · 0.45

Tested by

no test coverage detected