Skip to content

Commit

Permalink
Delete unused Thread::m_maxThreadCount (#100171)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkotas authored Mar 23, 2024
1 parent 7407e55 commit ff0a131
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
3 changes: 0 additions & 3 deletions src/coreclr/vm/threads.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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++;
Expand Down
11 changes: 0 additions & 11 deletions src/coreclr/vm/threads.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ff0a131

Please sign in to comment.