summaryrefslogtreecommitdiff
path: root/src/vm/win32threadpool.cpp
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2019-02-18 16:37:19 -0800
committerGitHub <noreply@github.com>2019-02-18 16:37:19 -0800
commit281f69036a435d11349fffdee6bb2f0c20f818eb (patch)
tree6fd05e3671cc2895ce4de4261bb7d8faf474addf /src/vm/win32threadpool.cpp
parentfe4efab4b771d6c01abe1109f7a81e405aa9fa4d (diff)
downloadcoreclr-281f69036a435d11349fffdee6bb2f0c20f818eb.tar.gz
coreclr-281f69036a435d11349fffdee6bb2f0c20f818eb.tar.bz2
coreclr-281f69036a435d11349fffdee6bb2f0c20f818eb.zip
Remove resetting of unmanaged thread locale from thread pool APIs (#22682)
The cost of doing this is showing up in the TechEmpower profiles. There is a lot of thread locale state in unmanaged libraries and OS APIs that the threadpool friendly code has to be aware off. It does not make sense to keep reseting just the Locale.
Diffstat (limited to 'src/vm/win32threadpool.cpp')
-rw-r--r--src/vm/win32threadpool.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/vm/win32threadpool.cpp b/src/vm/win32threadpool.cpp
index 908fedf51c..ccf6e8a484 100644
--- a/src/vm/win32threadpool.cpp
+++ b/src/vm/win32threadpool.cpp
@@ -831,8 +831,6 @@ BOOL ThreadpoolMgr::QueueUserWorkItem(LPTHREAD_START_ROUTINE Function,
ThreadCounter::Counts counts = CPThreadCounter.GetCleanCounts();
if ((MaxLimitTotalCPThreads - counts.NumActive) >= MinimumAvailableCPThreads )
{
- ThreadLocaleHolder localeHolder;
-
QueueUserWorkItemHelp(Function, Context);
return TRUE;
}
@@ -1507,8 +1505,6 @@ DWORD WINAPI ThreadpoolMgr::ExecuteHostRequest(PVOID pArg)
}
CONTRACTL_END;
- ThreadLocaleHolder localeHolder;
-
bool foundWork, wasNotRecalled;
ExecuteWorkRequest(&foundWork, &wasNotRecalled);
return ERROR_SUCCESS;
@@ -2005,8 +2001,6 @@ Work:
}
{
- ThreadLocaleHolder localeHolder;
-
ThreadpoolMgr::UpdateLastDequeueTime();
ThreadpoolMgr::ExecuteWorkRequest(&foundWork, &wasNotRecalled);
}
@@ -3621,8 +3615,6 @@ Top:
{
CONTRACT_VIOLATION(ThrowsViolation);
- ThreadLocaleHolder localeHolder;
-
((LPOVERLAPPED_COMPLETION_ROUTINE) key)(errorCode, numBytes, pOverlapped);
}