Opened 17 years ago
Closed 16 years ago
#486 closed Bugs (None)
Exception safety in class \"thread\"
Reported by: | nobody | Owned by: | Roland Schwarz |
---|---|---|---|
Milestone: | Component: | threads | |
Version: | None | Severity: | |
Keywords: | Cc: |
Description
If an exception is thrown during the copying of the "threadfunc" object in function "thread_proxy", the new thread silently ends and the constructor of class "thread" never returns. Therefore I would suggest to put a copy of "threadfunc" in the "thread_param" object (instead of a reference) and move it to the local variable in function "thread_proxy" via "threadfunc.swap(…)". In this way a potential exception would be thrown in the constructor of class "thread" and could be handled by the application.
Change History (2)
comment:1 by , 17 years ago
Summary: | Exception safety in class "thread" → Exception safety in class \"thread\" |
---|
Note:
See TracTickets
for help on using tickets.