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

Function std_threads_create_join

thread/test/test.cpp:932–950  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

930
931template<typename...Ts>
932void std_threads_create_join(int N, Ts&&...xs)
933{
934 std::vector<std::thread> ths;
935 for (int i=0; i<N; ++i)
936 {
937 ths.emplace_back(std::forward<Ts>(xs)...);
938 }
939 // for (int i=0; i<30; ++i)
940 // {
941 // ::sleep(1);
942 // auto _interrupted = photon::_interrupted.load();
943 // LOG_DEBUG(VALUE(_interrupted));
944 // }
945 for (size_t i=0; i<ths.size(); ++i)
946 {
947 ths[i].join();
948 LOG_DEBUG("finished ths[`].join()", i);
949 }
950}
951
952void photon_do(int n, thread_entry start, void* args)
953{

Callers 1

TESTFunction · 0.85

Calls 3

emplace_backMethod · 0.45
sizeMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected