MCPcopy Create free account
hub / github.com/fmtlib/fmt / CreateThread

Method CreateThread

test/gtest/gmock-gtest-all.cc:10797–10814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10795class ThreadWithParamSupport : public ThreadWithParamBase {
10796 public:
10797 static HANDLE CreateThread(Runnable* runnable,
10798 Notification* thread_can_start) {
10799 ThreadMainParam* param = new ThreadMainParam(runnable, thread_can_start);
10800 DWORD thread_id;
10801 HANDLE thread_handle = ::CreateThread(
10802 nullptr, // Default security.
10803 0, // Default stack size.
10804 &ThreadWithParamSupport::ThreadMain,
10805 param, // Parameter to ThreadMainStatic
10806 0x0, // Default creation flags.
10807 &thread_id); // Need a valid pointer for the call to work under Win98.
10808 GTEST_CHECK_(thread_handle != nullptr)
10809 << "CreateThread failed with error " << ::GetLastError() << ".";
10810 if (thread_handle == nullptr) {
10811 delete param;
10812 }
10813 return thread_handle;
10814 }
10815
10816 private:
10817 struct ThreadMainParam {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected