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