| 1569 | typedef void UserThreadFunc(T); |
| 1570 | |
| 1571 | ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start) |
| 1572 | : func_(func), |
| 1573 | param_(param), |
| 1574 | thread_can_start_(thread_can_start), |
| 1575 | finished_(false) { |
| 1576 | ThreadWithParamBase* const base = this; |
| 1577 | // The thread can be created only after all fields except thread_ |
| 1578 | // have been initialized. |
| 1579 | GTEST_CHECK_POSIX_SUCCESS_( |
| 1580 | pthread_create(&thread_, nullptr, &ThreadFuncWithCLinkage, base)); |
| 1581 | } |
| 1582 | ~ThreadWithParam() override { Join(); } |
| 1583 | |
| 1584 | void Join() { |
nothing calls this directly
no outgoing calls
no test coverage detected