Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
4eb84487
Commit
4eb84487
authored
Sep 21, 2016
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made thread_pool's destructor call abort() rather than rethrow any exception to
avoid compiler warnings.
parent
a2c152e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
thread_pool_extension.h
dlib/threads/thread_pool_extension.h
+6
-2
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
{
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
();
}
}
...
...
dlib/threads/thread_pool_extension_abstract.h
View file @
4eb84487
...
...
@@ -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
(
...
...
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