Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C++11 thread exception handling #180

Merged
merged 3 commits into from Mar 12, 2015
Merged

Conversation

@jdtournier
Copy link
Member

jdtournier commented Mar 12, 2015

Changes to handle exceptions thrown from threads more gracefully, as discussed in issue #167. Are we happy to merge this branch...?

jdtournier added 3 commits Feb 27, 2015
This allows exceptions thrown in threads to be handled by parent thread,
avoiding messy terminations when this happens - see discussion about
this in issue #167.
Previous commit introduced possibility of throwing in destructor of
thread object, which is not recommended (to the extent that destructors
in C++11 are by default not allowed to throw). This introduces a new
wait() method on the thread objects that can throw if any of the
corresponding threads do throw an Exception.
@Lestropie

This comment has been minimized.

Copy link
Member

Lestropie commented Mar 12, 2015

As long as there's no performance hit, I don't have a problem with it.

@jdtournier

This comment has been minimized.

Copy link
Member Author

jdtournier commented Mar 12, 2015

No, any performance hit would potentially be at thread creation and rejoin time, so I don't expect we would ever notice even if it was a big performance hit (which is unlikely)... I'll merge.

jdtournier added a commit that referenced this pull request Mar 12, 2015
@jdtournier jdtournier merged commit 70a9449 into master Mar 12, 2015
@jdtournier jdtournier deleted the C++11_thread_exception_handling branch Mar 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.