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 5821 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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!