| 77 | } |
| 78 | |
| 79 | void ThreadedDispatchQueue::async(Valdi::DispatchFunction function) { |
| 80 | auto task = _taskQueue->enqueue(std::move(function)); |
| 81 | |
| 82 | if (VALDI_UNLIKELY(task.isFirst)) { |
| 83 | startThread(); |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | task_id_t ThreadedDispatchQueue::asyncAfter(Valdi::DispatchFunction function, |
| 88 | std::chrono::steady_clock::duration delay) { |