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

Remove ThreadRAII #4851

Open
npoltorapavlo opened this issue Jan 23, 2024 · 0 comments
Open

Remove ThreadRAII #4851

npoltorapavlo opened this issue Jan 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@npoltorapavlo
Copy link
Contributor

The documentation says "...to avoid std::terminate exception. Use the ThreadRAII class for creating threads which will ensure that the thread gets joined before destruction". Please remove this and also remove ThreadRAII because it produces segfaults. std::terminate exception that you are trying to avoid points out the place in code that is not implemented correctly. It gives a full callstack as well. Compare this to a typical use of ThreadRAII:

A member;
ThreadRAII thread; // thread calls member
member destroys -> thread runs in join() -> segfault with unknown address/pure virtual call
@npoltorapavlo npoltorapavlo added the bug Something isn't working label Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant