Commit 4eb84487 authored by Davis King's avatar Davis King

Made thread_pool's destructor call abort() rather than rethrow any exception to

avoid compiler warnings.
parent a2c152e8
......@@ -513,12 +513,16 @@ namespace dlib
{
std::cerr << "An unhandled exception was inside a dlib::thread_pool when it was destructed." << std::endl;
std::cerr << "It's what string is: \n" << e.what() << std::endl;
throw;
using namespace std;
assert(false);
abort();
}
catch (...)
{
std::cerr << "An unhandled exception was inside a dlib::thread_pool when it was destructed." << std::endl;
throw;
using namespace std;
assert(false);
abort();
}
}
......
......@@ -251,6 +251,10 @@ namespace dlib
/*!
ensures
- blocks until all tasks in the pool have finished.
- If one of the threads has generated an exception but it hasn't yet been
rethrown to the caller (e.g. by calling wait_for_all_tasks()) then the
program will be terminated. So make sure you handle all the possible
exceptions from your tasks.
!*/
bool is_task_thread (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment