| 10795 | class 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 { |
nothing calls this directly
no outgoing calls
no test coverage detected