Skip to main content
gamedev.net
🔒 Locked

Threads

Started by Shlaklava 4 replies 700+ views
Original Post
Shlaklava
Shlaklava
I would like to know what library is good for threads (cross-platform library). I tried finding something on google but was not sure what one is the best one for C++
Antheus
Antheus
pthreads is popular.

There's also boost::threads. While solid, and in line with Boost quality, it's apparently maintained less than some would like.
Shlaklava
Shlaklava
Thanks for the recommendation, though I probably not use pthreads because I have no extra computer for linux right now.
Red Ant
Red Ant
Personally I've used zThread in 2 of my applications and found it very easy to use. The drawback is that it has basically been abandoned by its developer, so there won't be any new releases.

Another option is the Adaptive Communication Environment (ACE), which has, among much other useful stuff, a very mature threading library.
DaBono
DaBono
pthreads is available for Windows too.
boost::threads is indeed quite popular too, and a new up-and-comer is OpenMP.
But when you're doing only simple things: mutexes, conditions and threads, making your own wrappers around the Win32- and pthread-calls isn't too hard either.
Shlaklava
Shlaklava
Quote:
Original post by DaBono
pthreads is available for Windows too.
boost::threads is indeed quite popular too, and a new up-and-comer is OpenMP.
But when you're doing only simple things: mutexes, conditions and threads, making your own wrappers around the Win32- and pthread-calls isn't too hard either.


That is what I am going to do. All I need to do is run a thread and have it send messages to its parent thread (the main thread).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.