MCPcopy Create free account
hub / github.com/alibaba/PhotonLibOS / get_future

Function get_future

thread/test/test.cpp:1824–1829  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1822}
1823
1824static std::shared_ptr<Future<int>> get_future() {
1825 auto fut = std::make_shared<Future<int>>();
1826 thread_create11(_promise_worker, fut->get_promise());
1827 thread_usleep(1000 * 4);
1828 return fut;
1829}
1830
1831TEST(future, test2) {
1832 auto fut = get_future();

Callers 3

get_futureMethod · 0.85
get_futureMethod · 0.85
TESTFunction · 0.85

Calls 3

thread_create11Function · 0.50
thread_usleepFunction · 0.50
get_promiseMethod · 0.45

Tested by

no test coverage detected