| 196 | void onMainThread(Promise<Void>&& signal, TaskPriority taskID) override; |
| 197 | bool isOnMainThread() const override { return thread_network == this; } |
| 198 | void stop() override { |
| 199 | if (thread_network == this) |
| 200 | stopImmediately(); |
| 201 | else |
| 202 | onMainThreadVoid([this] { this->stopImmediately(); }); |
| 203 | } |
| 204 | void addStopCallback(std::function<void()> fn) override { |
| 205 | if (thread_network == this) |
| 206 | stopCallbacks.emplace_back(std::move(fn)); |
no test coverage detected