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

Method handleResponse

valdi/test/utils/MockAssetLoader.cpp:142–161  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

140}
141
142void MockAssetLoader::handleResponse(const Ref<AssetLoaderCompletion>& completion,
143 const Result<Ref<Valdi::LoadedAsset>>& result) {
144 {
145 std::lock_guard<Mutex> lock(_mutex);
146
147 bool foundCompletion = false;
148 for (const auto& it : _completions) {
149 if (it.lock() == completion) {
150 foundCompletion = true;
151 break;
152 }
153 }
154
155 if (!foundCompletion) {
156 return;
157 }
158 }
159
160 completion->onLoadComplete(result);
161}

Callers

nothing calls this directly

Calls 2

lockMethod · 0.45
onLoadCompleteMethod · 0.45

Tested by

no test coverage detected