Multiple Win32 threads in simple app.

Started by
1 comment, last by ChugginWindex 16 years, 3 months ago
I've created a simple C++ application in MSVC++ 2005. I've got a decent memory manager working in the background that I wrote and some other classes but I say simple mainly because the only thing the program does at the moment is initialize SDL for video and timers, and then sleep for 1 second before closing (I'm just using it to test other designs at the moment). For some reason whenever the program exits, in the run output I get: The thread 'Win32 Thread' (0xd28) has exited with code 1 (0x1). The thread 'Win32 Thread' (0xe88) has exited with code 1 (0x1). The thread 'Win32 Thread' (0xd8c) has exited with code 1 (0x1). The hex values for the threads (not the returns) is always different, and in the past I've never had three Win32 threads exiting simultaneously from the same program, although I have seen two on some occasions. What might cause this? I'm not using threads at all in my code like I said, so the only thing I can think of on my own is that maybe SDL is creating some sort of secondary thread for it's timing functions, and that possibly the debugger in MSVC is creating the third. But then I cannot explain how all three exit with the same return every time. Any help on this would be appreciated, I can't figure this one out at the moment.
Advertisement
It's nothing to worry about - perfectly normal.
Any of the libraries you use might run their own threads, and the CRT can quite happily do that same. You very seldom actually end up with only one thread in any useful single-threaded-apartment program.
"In order to understand recursion, you must first understand recursion."
My website dedicated to sorting algorithms
Alright thanks, that's the answer I was hoping for.

This topic is closed to new replies.

Advertisement