| 1581 | typedef void UserThreadFunc(T); |
| 1582 | |
| 1583 | ThreadWithParam(UserThreadFunc* func, T param, Notification* thread_can_start) |
| 1584 | : func_(func), |
| 1585 | param_(param), |
| 1586 | thread_can_start_(thread_can_start), |
| 1587 | finished_(false) { |
| 1588 | ThreadWithParamBase* const base = this; |
| 1589 | // The thread can be created only after all fields except thread_ |
| 1590 | // have been initialized. |
| 1591 | GTEST_CHECK_POSIX_SUCCESS_( |
| 1592 | pthread_create(&thread_, nullptr, &ThreadFuncWithCLinkage, base)); |
| 1593 | } |
| 1594 | ~ThreadWithParam() override { Join(); } |
| 1595 | |
| 1596 | void Join() { |
nothing calls this directly
no outgoing calls
no test coverage detected