static internal void PerformWaitOrTimerCallback(Object state, bool timedOut)
{
_ThreadPoolWaitOrTimerCallback helper = (_ThreadPoolWaitOrTimerCallback)state;
BCLDebug.Assert(helper != null, "Null state passed to PerformWaitOrTimerCallback!");
// call directly if it is an unsafe call OR EC flow is suppressed
if (helper._executionContext == null)
{
WaitOrTimerCallback callback = helper._waitOrTimerCallback;
callback(helper._state, timedOut);
}
else
{
if (timedOut)
ExecutionContext.Run(helper._executionContext.CreateCopy(), _ccbt, helper);
else
ExecutionContext.Run(helper._executionContext.CreateCopy(), _ccbf, helper);
}
}
};