| 189 | |
| 190 | template <unsigned long id> |
| 191 | void dotest2() |
| 192 | { |
| 193 | dlog << LINFO << "start dotest2()"; |
| 194 | print_spinner(); |
| 195 | bool error_occurred = false; |
| 196 | { |
| 197 | thread_function t1(callfunct(test2_job<id>, 12345, error_occurred)); |
| 198 | thread_function t2(callfunct(test2_job<id>, 12346, error_occurred)); |
| 199 | thread_function t3(callfunct(test2_job<id>, 12347, error_occurred)); |
| 200 | |
| 201 | // wait a little bit for the threads to start up |
| 202 | dlib::sleep(200); |
| 203 | |
| 204 | try |
| 205 | { |
| 206 | std::vector<network_address> hosts; |
| 207 | hosts.push_back("127.0.0.1:12345"); |
| 208 | hosts.push_back("127.0.0.1:12346"); |
| 209 | hosts.push_back("127.0.0.1:12347"); |
| 210 | bsp_connect(hosts, test2_job<id>); |
| 211 | } |
| 212 | catch (std::exception& e) |
| 213 | { |
| 214 | dlog << LERROR << "error during bsp_context: " << e.what(); |
| 215 | DLIB_TEST(false); |
| 216 | } |
| 217 | |
| 218 | } |
| 219 | DLIB_TEST(error_occurred == false); |
| 220 | } |
| 221 | |
| 222 | // ---------------------------------------------------------------------------------------- |
| 223 |
nothing calls this directly
no test coverage detected