public _ThreadPoolWaitCallback DeQueue()
{
bool flag = false;
_ThreadPoolWaitCallback callback = null;
RuntimeHelpers.PrepareConstrainedRegions();
try
{
}
finally
{
RuntimeHelpers.PrepareConstrainedRegions();
try
{
Monitor.Enter(this.tpSync);
flag = true;
}
catch (Exception)
{
}
if (flag)
{
_ThreadPoolWaitCallback tpHead = this.tpHead;
if (tpHead != null)
{
callback = tpHead;
this.tpHead = tpHead._next;
this.tpCount--;
if (this.tpCount == 0)
{
this.tpTail = null;
ThreadPool.ClearAppDomainRequestActive();
}
}
Monitor.Exit(this.tpSync);
}
}
return callback;
}