diff --git a/src/mscorlib/src/System/Threading/ThreadPool.cs b/src/mscorlib/src/System/Threading/ThreadPool.cs index 34810674ece2..fcf40a0241f1 100644 --- a/src/mscorlib/src/System/Threading/ThreadPool.cs +++ b/src/mscorlib/src/System/Threading/ThreadPool.cs @@ -1443,6 +1443,8 @@ internal _ThreadPoolWaitOrTimerCallback(WaitOrTimerCallback waitOrTimerCallback, [System.Security.SecurityCritical] // auto-generated static internal void PerformWaitOrTimerCallback(Object state, bool timedOut) { + ThreadPool.EnsureVMInitialized(); + _ThreadPoolWaitOrTimerCallback helper = (_ThreadPoolWaitOrTimerCallback)state; Contract.Assert(helper != null, "Null state passed to PerformWaitOrTimerCallback!"); // call directly if it is an unsafe call OR EC flow is suppressed @@ -1928,7 +1930,7 @@ unsafe public static bool UnsafeQueueNativeOverlapped(NativeOverlapped* overlapp [SecurityCritical] [MethodImpl(MethodImplOptions.AggressiveInlining)] - private static void EnsureVMInitialized() + internal static void EnsureVMInitialized() { if (!ThreadPoolGlobals.vmTpInitialized) {