| 25 | // ---------------------------------------------------------------------------------------- |
| 26 | |
| 27 | multithreaded_object:: |
| 28 | ~multithreaded_object ( |
| 29 | ) |
| 30 | { |
| 31 | try |
| 32 | { |
| 33 | DLIB_ASSERT(number_of_threads_alive() == 0, |
| 34 | "\tmultithreaded_object::~multithreaded_object()" |
| 35 | << "\n\tYou have let a multithreaded object destruct itself before terminating its threads" |
| 36 | << "\n\tthis: " << this |
| 37 | ); |
| 38 | } |
| 39 | catch (std::exception& e) |
| 40 | { |
| 41 | std::cerr << e.what() << std::endl; |
| 42 | assert(false); |
| 43 | abort(); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | // ---------------------------------------------------------------------------------------- |
| 48 | |