Sign in to follow this  
shaobohou

C or C++ threads

Recommended Posts

shaobohou    128
Does anyone know any C or C++ thread librarys that are cross platform, primarily for windows and linux? I am trying write a program that uses nonlinear optimisation algorithm to do inverse kinematics but because the nonlinear method is slow, it is difficult for it to be interactive. Therefore I am considering running the display (OpenGL) and optimisation in separate threads. Alternative to using threads are welcome too but keep in mind that I have to use the nonlinear optimisation algorithm for reason I don't need to go into.

Share this post


Link to post
Share on other sites
Icefox    238
pthreads.

Handy links:
http://www.humanfactor.com/pthreads/pthreadlinks.html
http://www.yolinux.com/TUTORIALS/LinuxTutorialPosixThreads.html
http://sources.redhat.com/pthreads-win32/

Share this post


Link to post
Share on other sites
SirLuthor    364
Just out of curiosity, if you were doing something not just to get it done as soon as possible, but also to learn stuff while doing it, would there be something to gain by rolling your own thread wrapper/library?

Share this post


Link to post
Share on other sites
Quote:
Original post by SirLuthor
Just out of curiosity, if you were doing something not just to get it done as soon as possible, but also to learn stuff while doing it, would there be something to gain by rolling your own thread wrapper/library?


Rolling your own thread system certainly won't be the fastest way, but you'll certainly learn something if you do. People roll their own container classes for the same reason, as a learning experience. I guess you'll have to decide which takes priority, getting it done ASAP or learning how it initimately works. [grin]

Share this post


Link to post
Share on other sites
SirLuthor    364
I'll go for 'learn intimately how it works' [grin] Hell, I have a few things I need rolled into it anyway that I doubt Boost has (I have some rather specific and odd needs from my threads, or at any rate, I will, once I get more of my engine core done [smile])

Share this post


Link to post
Share on other sites
Verg    450
Quote:
Original post by load_bitmap_file
Rolling your own thread system certainly won't be the fastest way, but you'll certainly learn something if you do. People roll their own container classes for the same reason, as a learning experience.


Suddenly, "rolling your own" takes on a new meaning [cool]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this