| 63 | bool failure; |
| 64 | |
| 65 | void perform_test ( |
| 66 | ) |
| 67 | { |
| 68 | failure = false; |
| 69 | print_spinner(); |
| 70 | |
| 71 | |
| 72 | count = 10; |
| 73 | if (!create_new_thread<threads_tester,&threads_tester::thread1>(*this)) failure = true; |
| 74 | if (!create_new_thread<threads_tester,&threads_tester::thread2>(*this)) failure = true; |
| 75 | if (!create_new_thread<threads_tester,&threads_tester::thread3>(*this)) failure = true; |
| 76 | if (!create_new_thread<threads_tester,&threads_tester::thread4>(*this)) failure = true; |
| 77 | if (!create_new_thread<threads_tester,&threads_tester::thread5>(*this)) failure = true; |
| 78 | if (!create_new_thread<threads_tester,&threads_tester::thread6>(*this)) failure = true; |
| 79 | if (!create_new_thread<threads_tester,&threads_tester::thread7>(*this)) failure = true; |
| 80 | if (!create_new_thread<threads_tester,&threads_tester::thread8>(*this)) failure = true; |
| 81 | if (!create_new_thread<threads_tester,&threads_tester::thread9>(*this)) failure = true; |
| 82 | if (!create_new_thread<threads_tester,&threads_tester::thread10>(*this)) failure = true; |
| 83 | |
| 84 | thread(66); |
| 85 | |
| 86 | // this should happen in the main program thread |
| 87 | if (is_dlib_thread()) |
| 88 | failure = true; |
| 89 | |
| 90 | auto_mutex M(cm); |
| 91 | while (count > 0 && !failure) |
| 92 | sm.wait(); |
| 93 | |
| 94 | |
| 95 | DLIB_TEST(!failure); |
| 96 | |
| 97 | test_async(); |
| 98 | } |
| 99 | |
| 100 | void thread_end_handler ( |
| 101 | ) |
nothing calls this directly
no test coverage detected