1
This commit is contained in:
@@ -74,8 +74,8 @@ namespace DOAN.ServiceCore
|
||||
await DbScoped.SugarScope.CopyNew().Insertable(storagelocation).ExecuteCommandAsync();
|
||||
|
||||
|
||||
await Task.Delay(3000, stoppingToken);
|
||||
Console.WriteLine("永驻线程,正在读取plc值 ");
|
||||
await Task.Delay(5000, stoppingToken);
|
||||
Console.WriteLine("永驻线程,正在读取plc值 "+ result);
|
||||
|
||||
index++;
|
||||
if (index > 16)
|
||||
|
||||
@@ -77,6 +77,7 @@ namespace DOAN.ServiceCore
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
PLCTool.ConnectClose();
|
||||
_cancellationTokenSource.Cancel();
|
||||
_executingTask.Wait();
|
||||
_cancellationTokenSource.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user