diff --git a/src/coreclr/vm/threads.cpp b/src/coreclr/vm/threads.cpp index bc7a06af0d1b09..d2e7a389adf12e 100644 --- a/src/coreclr/vm/threads.cpp +++ b/src/coreclr/vm/threads.cpp @@ -5153,7 +5153,6 @@ Thread::ApartmentState Thread::SetApartment(ApartmentState state) ThreadStore::ThreadStore() : m_Crst(CrstThreadStore, (CrstFlags) (CRST_UNSAFE_ANYMODE | CRST_DEBUGGER_THREAD)), m_ThreadCount(0), - m_MaxThreadCount(0), m_UnstartedThreadCount(0), m_BackgroundThreadCount(0), m_PendingThreadCount(0), @@ -5272,8 +5271,6 @@ void ThreadStore::AddThread(Thread *newThread) s_pThreadStore->m_ThreadList.InsertTail(newThread); s_pThreadStore->m_ThreadCount++; - if (s_pThreadStore->m_MaxThreadCount < s_pThreadStore->m_ThreadCount) - s_pThreadStore->m_MaxThreadCount = s_pThreadStore->m_ThreadCount; if (newThread->IsUnstarted()) s_pThreadStore->m_UnstartedThreadCount++; diff --git a/src/coreclr/vm/threads.h b/src/coreclr/vm/threads.h index c4bc4208121dfe..166f871c44860a 100644 --- a/src/coreclr/vm/threads.h +++ b/src/coreclr/vm/threads.h @@ -4210,26 +4210,15 @@ class ThreadStore // m_DeadThreadCount is the subset of m_ThreadCount which have died. The Win32 // thread has disappeared, but something (like the exposed object) has kept the // refcount non-zero so we can't destruct yet. - // - // m_MaxThreadCount is the maximum value of m_ThreadCount. ie. the largest number - // of simultaneously active threads protected: LONG m_ThreadCount; - LONG m_MaxThreadCount; public: LONG ThreadCountInEE () { LIMITED_METHOD_CONTRACT; return m_ThreadCount; } -#if defined(_DEBUG) || defined(DACCESS_COMPILE) - LONG MaxThreadCountInEE () - { - LIMITED_METHOD_CONTRACT; - return m_MaxThreadCount; - } -#endif private: LONG m_UnstartedThreadCount; LONG m_BackgroundThreadCount;