Commit 022d21a3 张东亮

视觉检测锁修改

1 个父辈 5fc9789c
......@@ -259,6 +259,8 @@ namespace DeviceLibrary
int retrytime = 0;
if (Monitor.TryEnter(testLocObj))
{
try
{
retry:
string logtxt = $"【" + cameraName + "】开始取图片测试是否有料盘" + "\r\n";
DateTime startTime = DateTime.Now;
......@@ -348,7 +350,6 @@ namespace DeviceLibrary
bmp.Dispose();
if (!string.IsNullOrEmpty(logtxt))
LogUtil.info(logtxt);
Monitor.Exit(testLocObj);
}
}
else
......@@ -498,10 +499,13 @@ namespace DeviceLibrary
bmp.Dispose();
if (!string.IsNullOrEmpty(logtxt))
LogUtil.info(logtxt);
Monitor.Exit(testLocObj);
}
}
}
finally
{
Monitor.Exit(testLocObj);
}
}
else
return null;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!