use*_*625 6 linq multithreading deadlock entity-framework typedescriptor
我有一个asp.net/mvc 3 /实体框架4.1 Web应用程序,它访问类库以查找表数据.当我第一次访问网站并尝试同时加载两个不同的页面时,应用程序池会挂起.没有死锁或数据库中的任何活动.我使用windbg/vs2010调试器来查找线程锁.两个线程锁定在System.Component.TypeDescriptor
.
执行陷入lookuptable.ToList
代码:
Using transaction As New TransactionScope(TransactionScopeOption.RequiresNew,
New TransactionOptions() With
{.IsolationLevel = IsolationLevel.ReadUncommitted})
Using db As New Entity
Dim lookuptable = From lk In db.LookUpTable Where lk.Id = pId Select lk
returnValue = lookuptable.ToList
End Using
End Using
Run Code Online (Sandbox Code Playgroud)
并行堆栈图像:
http://i50.tinypic.com/6gk3s3.jpg
谢谢你的帮助