what is the way to create Threads in C++

Started by
1 comment, last by hellfire 21 years, 9 months ago
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
Advertisement
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.

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.
"I thought what I'd do was, I'd pretend I was one of those deaf-mutes." - the Laughing Man

This topic is closed to new replies.

Advertisement