summaryrefslogtreecommitdiff
path: root/src/vm/win32threadpool.cpp
diff options
context:
space:
mode:
authorAustin Wise <AustinWise@gmail.com>2017-03-02 01:28:56 -0800
committerJan Vorlicek <janvorli@microsoft.com>2017-03-02 10:28:56 +0100
commit542ca8e3fe40dcea5c7c69bc20915ca41b8b3f97 (patch)
tree9e65ccda045c6c47144451c095509dfeb8248b2b /src/vm/win32threadpool.cpp
parent262f09cbb657febc7454ca8a9675d3213d5ee8a0 (diff)
downloadcoreclr-542ca8e3fe40dcea5c7c69bc20915ca41b8b3f97.tar.gz
coreclr-542ca8e3fe40dcea5c7c69bc20915ca41b8b3f97.tar.bz2
coreclr-542ca8e3fe40dcea5c7c69bc20915ca41b8b3f97.zip
Remove CLRThreadpoolHosted as it always returns false. (#9899)
Diffstat (limited to 'src/vm/win32threadpool.cpp')
-rw-r--r--src/vm/win32threadpool.cpp21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/vm/win32threadpool.cpp b/src/vm/win32threadpool.cpp
index ec42d5fbc2..a4b4ca9fe1 100644
--- a/src/vm/win32threadpool.cpp
+++ b/src/vm/win32threadpool.cpp
@@ -945,8 +945,6 @@ BOOL ThreadpoolMgr::QueueUserWorkItem(LPTHREAD_START_ROUTINE Function,
bool ThreadpoolMgr::ShouldWorkerKeepRunning()
{
WRAPPER_NO_CONTRACT;
- if (CLRThreadpoolHosted())
- return true;
//
// Maybe this thread should retire now. Let's see.
@@ -1001,7 +999,6 @@ void ThreadpoolMgr::AdjustMaxWorkersActive()
}
CONTRACTL_END;
- _ASSERTE(!CLRThreadpoolHosted());
_ASSERTE(ThreadAdjustmentLock.IsHeld());
DWORD currentTicks = GetTickCount();
@@ -1087,8 +1084,6 @@ void ThreadpoolMgr::MaybeAddWorkingWorker()
}
CONTRACTL_END;
- _ASSERTE(!CLRThreadpoolHosted());
-
// counts volatile read paired with CompareExchangeCounts loop set
ThreadCounter::Counts counts = WorkerCounter.DangerousGetDirtyCounts();
ThreadCounter::Counts newCounts;
@@ -1503,7 +1498,7 @@ void ThreadpoolMgr::EnsureGateThreadRunning()
LIMITED_METHOD_CONTRACT;
// The gate thread is only needed if the CLR is providing part of the ThreadPool implementation.
- _ASSERTE(!CLRThreadpoolHosted() || !CLRIoCompletionHosted());
+ _ASSERTE(!CLRIoCompletionHosted());
while (true)
{
@@ -1555,7 +1550,7 @@ bool ThreadpoolMgr::ShouldGateThreadKeepRunning()
LIMITED_METHOD_CONTRACT;
// The gate thread is only needed if the CLR is providing part of the ThreadPool implementation.
- _ASSERTE(!CLRThreadpoolHosted() || !CLRIoCompletionHosted());
+ _ASSERTE(!CLRIoCompletionHosted());
_ASSERTE(GateThreadStatus == GATE_THREAD_STATUS_WAITING_FOR_REQUEST ||
GateThreadStatus == GATE_THREAD_STATUS_REQUESTED);
@@ -1584,8 +1579,7 @@ bool ThreadpoolMgr::ShouldGateThreadKeepRunning()
// Are there any work requests in any worker queue? If so, we need a gate thread.
// This imples that whenever a work queue goes from empty to non-empty, we need to call EnsureGateThreadRunning().
//
- bool needGateThreadForWorkerThreads =
- !CLRThreadpoolHosted() &&
+ bool needGateThreadForWorkerThreads =
PerAppDomainTPCountList::AreRequestsPendingInAnyAppDomains();
//
@@ -2067,8 +2061,6 @@ DWORD __stdcall ThreadpoolMgr::WorkerThreadStart(LPVOID lpArgs)
}
CONTRACTL_END;
- _ASSERTE(!CLRThreadpoolHosted());
-
Thread *pThread = NULL;
DWORD dwSwitchCount = 0;
BOOL fThreadInit = FALSE;
@@ -3334,7 +3326,7 @@ BOOL ThreadpoolMgr::CreateGateThread()
LIMITED_METHOD_CONTRACT;
// The gate thread is only needed if the CLR is providing part of the ThreadPool implementation.
- _ASSERTE(!CLRThreadpoolHosted() || !CLRIoCompletionHosted());
+ _ASSERTE(!CLRIoCompletionHosted());
HANDLE threadHandle = Thread::CreateUtilityThread(Thread::StackSize_Small, GateThreadStart, NULL);
@@ -4305,7 +4297,7 @@ DWORD __stdcall ThreadpoolMgr::GateThreadStart(LPVOID lpArgs)
CONTRACTL_END;
// The gate thread is only needed if the CLR is providing part of the ThreadPool implementation.
- _ASSERTE(!CLRThreadpoolHosted() || !CLRIoCompletionHosted());
+ _ASSERTE(!CLRIoCompletionHosted());
_ASSERTE(GateThreadStatus == GATE_THREAD_STATUS_REQUESTED);
@@ -4533,8 +4525,7 @@ DWORD __stdcall ThreadpoolMgr::GateThreadStart(LPVOID lpArgs)
}
#endif // !FEATURE_PAL
- if (!CLRThreadpoolHosted() &&
- (0 == CLRConfig::GetConfigValue(CLRConfig::INTERNAL_ThreadPool_DisableStarvationDetection)))
+ if (0 == CLRConfig::GetConfigValue(CLRConfig::INTERNAL_ThreadPool_DisableStarvationDetection))
{
if (PerAppDomainTPCountList::AreRequestsPendingInAnyAppDomains() && SufficientDelaySinceLastDequeue())
{