cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
STD::Thread - Exiting Application Proper
STD::Thread - Exiting Application Properly with stopped threads and aborting threads...
May 16, 2014 at 2:29pm UTC
ckoeber
(9)
Hello,
I have an application which uses std::threads and for the most part the threads work fine.
One of my threads is a "loading" thread for content and after it is finished my application no longer has use for it.
However, even though that thread is no longer being used I still get the following error message (also linked as a picture.
1
2
R6010 - abort() has been called
How do I handle std::threads that finished processing and how do I properly abort them if a user decides to end the application?
Thank you.
Picture link:
http://s29.postimg.org/i8cn4ae1z/std_thread.png
May 16, 2014 at 2:38pm UTC
Cubbi
(4774)
How do I handle std::threads that finished processing
You join those threads:
http://www.cplusplus.com/reference/thread/thread/join
http://en.cppreference.com/w/cpp/thread/thread/join
May 17, 2014 at 12:07pm UTC
ckoeber
(9)
Thank you, I initially thought you joined a thread only when it was running.
Topic archived. No new replies allowed.