| 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 | |
| 694 | void 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) { |
no test coverage detected