Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

hellfire

what is the way to create Threads in C++

This topic is 5917 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 am going to multithread my app, what is the best way to convert my loops into threads in C++? I have done in Java but I am not as familiar with C++. Any tips and pointers on this subject would help me out. Thanks

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Win32: search for _beginthreadex in the MSDN.
Don''t use CreateThread or anything like that if you need the C/C++ run-time functions. You''ll see why if you check the MSDN.

Share this post


Link to post
Share on other sites
On windows take a look at _beginthreadex, WaitForSingleObject (and friends), CreateEvent (and friends). Also consider that converting a loop into a thread might not be the best approach to take at all due to the speed gains over Java that C++ provides.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!