开发者

ReaderWriterLockSlim throwing exception "the write lock is released without held"

I am having problem with ReaderWriterLockslim. As you can see in the following code, I first gain the writelock, then I release it. But when it comes to release, it says that "The write lock is released without held". So I am stuck and I need help regarding this. There is no much information available regarding this on the internet.

RWLock.EnterWriteLock(); 
try
{
    //Doublecheck

    if (DateTime.Now.Subtract(LastRefresTime).TotalMinutes > Refr开发者_JAVA技巧eshTimeInterval.TotalMinutes)
    {
        _cacheObject = ReloadCache();
    }

    LastRefresTime = DateTime.Now;
}
finally
{
    RWLock.ExitWriteLock();

}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜