| 139 | } |
| 140 | |
| 141 | void ActionQueue::RunActions() |
| 142 | { |
| 143 | std::shared_ptr<MacroAction> action; |
| 144 | while (true) { |
| 145 | { // Grab next action to run |
| 146 | std::unique_lock<std::mutex> lock(_mutex); |
| 147 | while (_actions.empty() && !_stop) { |
| 148 | _lastEmpty = |
| 149 | std::chrono::high_resolution_clock::now(); |
| 150 | _cv.wait(lock); |
| 151 | } |
| 152 | |
| 153 | if (_stop) { |
| 154 | return; |
| 155 | } |
| 156 | action = _actions.front(); |
| 157 | _actions.pop_front(); |
| 158 | } |
| 159 | |
| 160 | if (!action) { |
| 161 | continue; |
| 162 | } |
| 163 | |
| 164 | if (ActionLoggingEnabled()) { |
| 165 | blog(LOG_INFO, "Performing action '%s' in queue '%s'", |
| 166 | action->GetId().c_str(), _name.c_str()); |
| 167 | action->LogAction(); |
| 168 | } |
| 169 | action->PerformAction(); |
| 170 | } |
| 171 | } |
| 172 | |
| 173 | ActionQueueSettingsDialog::ActionQueueSettingsDialog(QWidget *parent, |
| 174 | ActionQueue &settings) |
nothing calls this directly
no test coverage detected