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

Function thread_join

thread/thread.cpp:1530–1543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1528 }
1529
1530 void* thread_join(join_handle* jh) {
1531 auto th = (thread*)jh;
1532 assert(th->is_joinable());
1533 if (!th->is_joinable())
1534 LOG_ERROR_RETURN(ENOSYS, nullptr, "join is not enabled for thread ", th);
1535
1536 th->lock.lock();
1537 while (th->state != states::DONE) {
1538 th->cond.wait(th->lock);
1539 }
1540 auto retval = th->retval;
1541 th->dispose();
1542 return retval;
1543 }
1544 inline void thread_join(thread* th)
1545 {
1546 thread_join((join_handle*)th);

Callers 15

do_io_testFunction · 0.85
TEST_FFunction · 0.85
create_n_thread_doFunction · 0.85
terminateMethod · 0.85
~TCPSocketPoolMethod · 0.85
handle_requestMethod · 0.85
test_curlFunction · 0.85
test_clientFunction · 0.85
TESTFunction · 0.85
~TestRPCServerMethod · 0.85
TESTFunction · 0.85

Calls 4

is_joinableMethod · 0.80
lockMethod · 0.45
waitMethod · 0.45
disposeMethod · 0.45

Tested by 15

do_io_testFunction · 0.68
TEST_FFunction · 0.68
create_n_thread_doFunction · 0.68
test_curlFunction · 0.68
test_clientFunction · 0.68
TESTFunction · 0.68
~TestRPCServerMethod · 0.68
TESTFunction · 0.68
TEST_FFunction · 0.68
TESTFunction · 0.68
run_real_socketFunction · 0.68