(reason?: string)
| 3624 | |
| 3625 | cancelAllOperations(reason?: string): void { |
| 3626 | const tokens = Array.from(this.activeTokens); |
| 3627 | this.activeTokens.clear(); |
| 3628 | for (const token of tokens) { |
| 3629 | if (!token.aborted) token.abort(reason || "操作已取消"); |
| 3630 | } |
| 3631 | } |
| 3632 | |
| 3633 | async destroy(): Promise<void> { |
| 3634 | this.cancelAllOperations("服务已停止"); |
| 3635 | if (this.configManager) this.configManager.unregisterListener(this); |