From d522c1c5762d514ae3c5b34774c3439186048dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A6=82=E6=84=8F=20=E5=BD=AD?= <2417589739@qq.com> Date: Wed, 26 Apr 2023 10:17:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E9=85=8D=E6=96=99=E7=AB=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- BPASmartClient.Helper/ThreadManage.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BPASmartClient.Helper/ThreadManage.cs b/BPASmartClient.Helper/ThreadManage.cs index 33d37d20..732d2364 100644 --- a/BPASmartClient.Helper/ThreadManage.cs +++ b/BPASmartClient.Helper/ThreadManage.cs @@ -197,8 +197,13 @@ namespace BPASmartClient.Helper /// public bool IsCanncel(string key) { - if(CancellationTokenSources.ContainsKey(guid + key)) return CancellationTokenSources[guid + key].IsCancellationRequested; + if (CancellationTokenSources.ContainsKey(guid + key)) return CancellationTokenSources[guid + key].IsCancellationRequested; return false; } + + public bool IsContainsKey(string key) + { + return Threads.ContainsKey(guid + key); + } } }