| 54 | typename pipe |
| 55 | > |
| 56 | void threadproc1 ( |
| 57 | void* param |
| 58 | ) |
| 59 | { |
| 60 | add_running_thread(); |
| 61 | pipe& p = *static_cast<pipe*>(param); |
| 62 | try |
| 63 | { |
| 64 | |
| 65 | int last = -1; |
| 66 | for (unsigned long i = 0; i < proc1_count; ++i) |
| 67 | { |
| 68 | int cur=0; |
| 69 | DLIB_TEST(p.dequeue(cur) == true); |
| 70 | DLIB_TEST(last + 1 == cur); |
| 71 | last = cur; |
| 72 | } |
| 73 | DLIB_TEST(p.size() == 0); |
| 74 | } |
| 75 | catch(exception& e) |
| 76 | { |
| 77 | auto_mutex M(m); |
| 78 | found_error = true; |
| 79 | cout << "\n\nERRORS FOUND" << endl; |
| 80 | cout << e.what() << endl; |
| 81 | dlog << LWARN << "ERRORS FOUND"; |
| 82 | dlog << LWARN << e.what(); |
| 83 | p.disable(); |
| 84 | } |
| 85 | |
| 86 | remove_running_thread(); |
| 87 | } |
| 88 | |
| 89 | |
| 90 | template < |
nothing calls this directly
no test coverage detected