Commit 0d25c6ad 刘韬

修正linerunmonitor的一个lock bug

1 个父辈 a469b622
此文件类型无法预览
...@@ -38,13 +38,10 @@ namespace DeviceLibrary ...@@ -38,13 +38,10 @@ namespace DeviceLibrary
private void LineTimer_Elapsed(object sender, ElapsedEventArgs e) private void LineTimer_Elapsed(object sender, ElapsedEventArgs e)
{ {
lock (linrunlist) if (canStopLine(out _) && isIOon)//(DOValue(LineIO).Equals(IO_VALUE.HIGH) || DOValue(LineRevIO).Equals(IO_VALUE.HIGH)))
{ {
if (canStopLine(out _) && isIOon)//(DOValue(LineIO).Equals(IO_VALUE.HIGH) || DOValue(LineRevIO).Equals(IO_VALUE.HIGH))) IOSTOP();
{ LogUtil.info(Name + $" 线体管理器 停止线体.");
IOSTOP();
LogUtil.info(Name + $" 线体管理器 停止线体.");
}
} }
} }
...@@ -137,6 +134,7 @@ namespace DeviceLibrary ...@@ -137,6 +134,7 @@ namespace DeviceLibrary
linrunlist.Add(id, DateTime.Now.AddSeconds(seconds)); linrunlist.Add(id, DateTime.Now.AddSeconds(seconds));
} }
LogUtil.info(Name + $" 线体管理器 {id},{parentname} 请求链条运行 {seconds}秒."); LogUtil.info(Name + $" 线体管理器 {id},{parentname} 请求链条运行 {seconds}秒.");
linrunlist.Values.ToList().ForEach(l => { LogUtil.info(Name + " " + l); });
} }
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!