| 114 | } |
| 115 | |
| 116 | DispatchFunction TaskQueue::lockFreeRemoveTask(task_id_t taskId) { |
| 117 | for (auto i = _tasks.begin(); i != _tasks.end(); ++i) { |
| 118 | if (i->id == taskId) { |
| 119 | auto task = std::move(*i); |
| 120 | _tasks.erase(i); |
| 121 | return std::move(task.function); |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | return DispatchFunction(); |
| 126 | } |
| 127 | |
| 128 | void TaskQueue::barrier(const DispatchFunction& function) { |
| 129 | auto executeTime = std::chrono::steady_clock::now(); |
nothing calls this directly
no test coverage detected