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

Method enqueueLoadOperation

valdi/src/valdi/runtime/RuntimeManager.cpp:702–714  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

700 }
701}
702
703void RuntimeManager::enqueueLoadOperation(Valdi::DispatchFunction&& loadOperation) {
704 if (Valdi::isApplicationShuttingDown()) {
705 return;
706 }
707 updateLoadOperationsCount(1);
708
709 _workerQueue->async([weakSelf = weakRef(this), loadOperation = std::move(loadOperation)]() {
710 if (auto strongThis = weakSelf.lock()) {
711 loadOperation();
712 strongThis->updateLoadOperationsCount(-1);
713 }
714 });
715}
716
717void RuntimeManager::flushLoadOperations() {

Callers

nothing calls this directly

Calls 5

weakRefFunction · 0.85
asyncMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected