//全局变量,线程锁变量参数
private static int inTimerDelFile = 0;
/// <summary>
/// 删除文件
/// </summary>
/// <param name="source"></param>
/// <param name="e"></param>
private static void DelFileEvent(object source, ElapsedEventArgs e)
{
try
{
if (Interlocked.Exchange(ref inTimerDelFile, 1) == 0)
{
Model.DT_DECSERCONFIG tempDecSerConfig = _CurrentDecSerConfig;
JG.EWM.BLL.DeCodeBusiness.fDelFiles(tempDecSerConfig);
System.Threading.Thread.Sleep(5);
Interlocked.Exchange(ref inTimerDelFile, 0);
}
}
catch (Exception ex)
{
Hzjg.Common.Utility.Log.fWriterLog("删除文件线程出错:", ex);
}
}
private static int inTimerDelFile = 0;
/// <summary>
/// 删除文件
/// </summary>
/// <param name="source"></param>
/// <param name="e"></param>
private static void DelFileEvent(object source, ElapsedEventArgs e)
{
try
{
if (Interlocked.Exchange(ref inTimerDelFile, 1) == 0)
{
Model.DT_DECSERCONFIG tempDecSerConfig = _CurrentDecSerConfig;
JG.EWM.BLL.DeCodeBusiness.fDelFiles(tempDecSerConfig);
System.Threading.Thread.Sleep(5);
Interlocked.Exchange(ref inTimerDelFile, 0);
}
}
catch (Exception ex)
{
Hzjg.Common.Utility.Log.fWriterLog("删除文件线程出错:", ex);
}
}