简体   繁体   中英

VS2013, C++: Unknown "thread X exited with code 0"

I am developing some Qt application on VS2013. One day I turned my attention to the fact that Qt runtime libs perform strange CPU consumptive actions. Firstly, I decided that it occurs in Qt debug libs only and turned my debug configuration to use Qt release libs. But I am still confused when observing in VS output window, at the middle of debugging my application, such prints: The thread 0xXXXX has exited with code 0 (0x0) . I don't understand which thread was finished. How can I detect what thread is hidden behind this thread ID = 0xXXXX once this thread has already finished?

UPDATE (clarification) In my question I meant: 1. Is it possible to get some information about a thread ID appeared in such VS print 2. Does somebody know what Qt may execute in such hidden threads?

Different libraries may create worker threads for various purposes.

If you want to investigate this further do the following in VS IDE:

  1. Debug -> Break All. This will stop all threads in the process
  2. Debug -> Windows -> Threads to get list of all threads.

By examining call stack of threads you may get an idea of its purpose.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM