| 506 | } |
| 507 | |
| 508 | ~thread_pool ( |
| 509 | ) |
| 510 | { |
| 511 | try |
| 512 | { |
| 513 | impl->shutdown_pool(); |
| 514 | } |
| 515 | catch (std::exception& e) |
| 516 | { |
| 517 | std::cerr << "An unhandled exception was inside a dlib::thread_pool when it was destructed." << std::endl; |
| 518 | std::cerr << "It's what string is: \n" << e.what() << std::endl; |
| 519 | assert(false); |
| 520 | abort(); |
| 521 | } |
| 522 | catch (...) |
| 523 | { |
| 524 | std::cerr << "An unhandled exception was inside a dlib::thread_pool when it was destructed." << std::endl; |
| 525 | assert(false); |
| 526 | abort(); |
| 527 | } |
| 528 | } |
| 529 | |
| 530 | void wait_for_task ( |
| 531 | uint64 task_id |