public void ThreadTask()
{
Panda.Framework.Helper.ConsoleHelper.WriteInfoLine("==》自动化任务启动");
deviceTimerThread = new Thread(DeviceTimerThread);
deviceTimerThread.Start();
}
private async void DeviceTimerThread()
{
#region 阀门定时任务线程
if (GloalConfigs.EnableRuningTimerDevice)
{
return;
}
GloalConfigs.EnableRuningTimerDevice = true;
while (GloalConfigs.EnableRuningTimerDevice)
{
#region 任务线程
try
{
}
catch
{
//错误处理
}
finally
{
await Task.Delay(1000);
}
#endregion
}
#endregion
}