MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / WatcherThreadFunc

Method WatcherThreadFunc

tests/gtest/gtest-all.cc:10363–10372  ·  view source on GitHub ↗

Monitors exit from a given thread and notifies those ThreadIdToThreadLocals about thread termination.

Source from the content-addressed store, hash-verified

10361 // Monitors exit from a given thread and notifies those
10362 // ThreadIdToThreadLocals about thread termination.
10363 static DWORD WINAPI WatcherThreadFunc(LPVOID param) {
10364 const ThreadIdAndHandle* tah =
10365 reinterpret_cast<const ThreadIdAndHandle*>(param);
10366 GTEST_CHECK_(
10367 ::WaitForSingleObject(tah->second, INFINITE) == WAIT_OBJECT_0);
10368 OnThreadExit(tah->first);
10369 ::CloseHandle(tah->second);
10370 delete tah;
10371 return 0;
10372 }
10373
10374 // Returns map of thread local instances.
10375 static ThreadIdToThreadLocals* GetThreadLocalsMapLocked() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected