在ASP.NET 3.5中,我們懷疑由「Timer」觸發的委託會阻止其他方法調用。從日誌中,一些函數調用將等待代理完成並繼續工作。.NET「Timer」會阻止其他方法調用?
這是真的嗎?如果是,我可以做什麼解決方法?
PS:委託中包含的代碼使用WCF檢索數據和下面的代碼
private void Replace<T>(ref IList<T> src, IList<T> des)
{
lock(src)
{
while (src.Count > 0)
{
GC.SuppressFinalize(src.ElementAt(0));
src.RemoveAt(0);
}
GC.SuppressFinalize(src);
src = des;
}
}
非常感謝。