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

Method CreateThread

tests/gtest/gtest-all.cc:10171–10188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10169class ThreadWithParamSupport : public ThreadWithParamBase {
10170 public:
10171 static HANDLE CreateThread(Runnable* runnable,
10172 Notification* thread_can_start) {
10173 ThreadMainParam* param = new ThreadMainParam(runnable, thread_can_start);
10174 DWORD thread_id;
10175 HANDLE thread_handle = ::CreateThread(
10176 nullptr, // Default security.
10177 0, // Default stack size.
10178 &ThreadWithParamSupport::ThreadMain,
10179 param, // Parameter to ThreadMainStatic
10180 0x0, // Default creation flags.
10181 &thread_id); // Need a valid pointer for the call to work under Win98.
10182 GTEST_CHECK_(thread_handle != nullptr)
10183 << "CreateThread failed with error " << ::GetLastError() << ".";
10184 if (thread_handle == nullptr) {
10185 delete param;
10186 }
10187 return thread_handle;
10188 }
10189
10190 private:
10191 struct ThreadMainParam {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected