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

Method updateLoadOperationsCount

valdi/src/valdi/runtime/RuntimeManager.cpp:685–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

683 std::lock_guard<Mutex> guard(_mutex);
684 auto it = _listeners.begin();
685 while (it != _listeners.end()) {
686 if (*it == listener) {
687 it = _listeners.erase(it);
688 } else {
689 it++;
690 }
691 }
692}
693
694void RuntimeManager::updateLoadOperationsCount(int increment) {
695 std::lock_guard<Mutex> guard(_mutex);
696 _loadOperationsCount += increment;
697
698 if (_loadOperationsCount == 1 && increment > 0) {
699 // Just added a new load operation. disable auto render
700 for (const auto& runtime : getAllRuntimes(guard)) {
701 runtime->setAutoRenderDisabled(true);
702 }
703 } else if (_loadOperationsCount == 0) {

Callers 1

enqueueLoadOperationMethod · 0.80

Calls 1

setAutoRenderDisabledMethod · 0.80

Tested by

no test coverage detected