From ff0a1314620543ee591deba8bc3bef91ea0964a0 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Fri, 22 Mar 2024 22:17:13 -0700 Subject: [PATCH] Delete unused Thread::m_maxThreadCount (#100171) --- src/coreclr/vm/threads.cpp | 3 --- src/coreclr/vm/threads.h | 11 ----------- 2 files changed, 14 deletions(-) diff --git a/src/coreclr/vm/threads.cpp b/src/coreclr/vm/threads.cpp index bc7a06af0d1b0..d2e7a389adf12 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 c4bc4208121df..166f871c44860 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;