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

Method ThreadWithParam

test/gtest/gtest/gtest.h:1571–1581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected