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

Method ThreadWithParam

tests/gtest/gtest.h:1583–1593  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected