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

Method loadSync

valdi/test/integration/Runtime_tests.cpp:4905–4912  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4903 }
4904
4905 static Result<Ref<Valdi::LoadedAsset>> loadSync(RuntimeWrapper& runtimeWrapper, const Ref<Asset>& asset) {
4906 auto observer = makeShared<AssetLoadObserverImpl>();
4907 asset->addLoadObserver(observer, snap::valdi_core::AssetOutputType::Dummy, 0, 0, Value());
4908
4909 runtimeWrapper.mainQueue->runUntilTrue([&]() { return !observer->_result.empty(); });
4910
4911 return observer->_result;
4912 }
4913
4914private:
4915 Result<Ref<Valdi::LoadedAsset>> _result;

Callers

nothing calls this directly

Calls 4

runUntilTrueMethod · 0.80
addLoadObserverMethod · 0.65
ValueInterface · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected