|
|
@@ -44,6 +44,7 @@ namespace BPASmartClient.Helper |
|
|
|
CancellationTokenSources.TryAdd(guid + key, new CancellationTokenSource()); |
|
|
|
bool result = Threads.TryAdd(guid + key, Task.Factory.StartNew(new Action(() => |
|
|
|
{ |
|
|
|
Thread.CurrentThread.Name = key; |
|
|
|
ReStart: |
|
|
|
try |
|
|
|
{ |
|
|
@@ -89,6 +90,7 @@ namespace BPASmartClient.Helper |
|
|
|
CancellationTokenSources.TryAdd(guid + key, new CancellationTokenSource()); |
|
|
|
bool result = Threads.TryAdd(guid + key, Task.Factory.StartNew(new Action(() => |
|
|
|
{ |
|
|
|
Thread.CurrentThread.Name = key; |
|
|
|
try |
|
|
|
{ |
|
|
|
if (action != null) action(); |
|
|
|