Jump to content
  • Advertisement
Sign in to follow this  
ChugginWindex

Multiple Win32 threads in simple app.

This topic is 3984 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!