Call when the state of one slot is changed, it will move one task from deferred to main queue
| 1631 | |
| 1632 | // Call when the state of one slot is changed, it will move one task from deferred to main queue |
| 1633 | void pop_deferred_task() { |
| 1634 | std::unique_lock<std::mutex> lock(mutex_tasks); |
| 1635 | if (!queue_tasks_deferred.empty()) { |
| 1636 | queue_tasks.emplace_back(std::move(queue_tasks_deferred.front())); |
| 1637 | queue_tasks_deferred.pop_front(); |
| 1638 | } |
| 1639 | condition_tasks.notify_one(); |
| 1640 | } |
| 1641 | |
| 1642 | // end the start_loop routine |
| 1643 | void terminate() { |