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

Method schedulePreload

valdi/src/valdi/runtime/Views/ViewPreloader.cpp:65–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63}
64
65void ViewPreloader::schedulePreload() {
66 auto strongThis = strongRef(this);
67
68 if (_workQueue != nullptr) {
69 _workQueue->async([=]() { strongThis->preload(); });
70 } else {
71 _mainThreadManager.dispatch(nullptr, [=]() { strongThis->preload(); });
72 }
73}
74
75void ViewPreloader::setWorkQueue(const Ref<DispatchQueue>& workQueue) {
76 std::lock_guard<std::mutex> lock(_mutex);

Callers

nothing calls this directly

Calls 4

strongRefFunction · 0.85
preloadMethod · 0.65
asyncMethod · 0.45
dispatchMethod · 0.45

Tested by

no test coverage detected