Merge pull request #2570 from xieyubo:1.10

PiperOrigin-RevId: 281971090
This commit is contained in:
Gennadiy Civil 2019-11-22 16:33:23 -05:00
commit af71b6607f

View File

@ -537,6 +537,9 @@ class ThreadLocalRegistryImpl {
// Returns a value that can be used to identify the thread from other threads.
static ThreadLocalValueHolderBase* GetValueOnCurrentThread(
const ThreadLocalBase* thread_local_instance) {
#ifdef _MSC_VER
MemoryIsNotDeallocated memory_is_not_deallocated;
#endif // _MSC_VER
DWORD current_thread = ::GetCurrentThreadId();
MutexLock lock(&mutex_);
ThreadIdToThreadLocals* const thread_to_thread_locals =