Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross platform multithreading in C++?

Basically, the title explains it all; I'm looking to make a game in C++ and I want to use multithreading for stuff like the physics engine and keeping the animation smooth on the loading screen. I've seen a few multithreading libraries, but I'm wondering which is best for my application, which will work well on Windows Mac and Linux. Does such a library exist?

like image 939
Bojangles Avatar asked Dec 06 '25 16:12

Bojangles


2 Answers

You probably want boost::thread or Intels' Thread Building Blocks. I'd recommend TBB but it's not free, I think, so boost::thread for the free option.

like image 156
Puppy Avatar answered Dec 08 '25 05:12

Puppy


If you can use c++0x threads, then use that.

If not, boost::thread is the best free multi-platform library.

like image 42
BЈовић Avatar answered Dec 08 '25 04:12

BЈовић



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!