Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete unused ThreadStore::m_maxThreadCount #100171

Merged
merged 1 commit into from
Mar 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading