| 59 | } |
| 60 | |
| 61 | void UTTaskPool::stop(bool notify) |
| 62 | { |
| 63 | if (notify) { |
| 64 | for (const auto &task : taskQueue) { |
| 65 | Q_EMIT stoped(task.item); |
| 66 | } |
| 67 | } |
| 68 | taskQueue.clear(); |
| 69 | |
| 70 | while (!llmItemMap.isEmpty()) { |
| 71 | if (notify) |
| 72 | Q_EMIT stoped(llmItemMap.first()); |
| 73 | llmItemMap.firstKey()->cancel(); |
| 74 | } |
| 75 | } |
| 76 | |
| 77 | void UTTaskPool::stop(NodeItem *item) |
| 78 | { |