Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
4eb84487
Commit
4eb84487
authored
Sep 21, 2016
by
Davis King
Browse files
Made thread_pool's destructor call abort() rather than rethrow any exception to
avoid compiler warnings.
parent
a2c152e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
dlib/threads/thread_pool_extension.h
dlib/threads/thread_pool_extension.h
+6
-2
dlib/threads/thread_pool_extension_abstract.h
dlib/threads/thread_pool_extension_abstract.h
+4
-0
No files found.
dlib/threads/thread_pool_extension.h
View file @
4eb84487
...
@@ -513,12 +513,16 @@ namespace dlib
...
@@ -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
<<
"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
;
std
::
cerr
<<
"It's what string is:
\n
"
<<
e
.
what
()
<<
std
::
endl
;
throw
;
using
namespace
std
;
assert
(
false
);
abort
();
}
}
catch
(...)
catch
(...)
{
{
std
::
cerr
<<
"An unhandled exception was inside a dlib::thread_pool when it was destructed."
<<
std
::
endl
;
std
::
cerr
<<
"An unhandled exception was inside a dlib::thread_pool when it was destructed."
<<
std
::
endl
;
throw
;
using
namespace
std
;
assert
(
false
);
abort
();
}
}
}
}
...
...
dlib/threads/thread_pool_extension_abstract.h
View file @
4eb84487
...
@@ -251,6 +251,10 @@ namespace dlib
...
@@ -251,6 +251,10 @@ namespace dlib
/*!
/*!
ensures
ensures
- blocks until all tasks in the pool have finished.
- 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
(
bool
is_task_thread
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment