| 930 | |
| 931 | template<typename...Ts> |
| 932 | void 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 | |
| 952 | void photon_do(int n, thread_entry start, void* args) |
| 953 | { |
no test coverage detected