hi c++ guys, my question is....What is the best and illustrative, way of learning thread in c + +, which is the most complete library to use threads in any application made in c + + (sdl,windows,linux).... I've been reading about this, but I just want to read your opinions, based on your knowledge and experience, if you do not tell me anything about this, I'll have to try one after another library, to finally find what I really looking for (complete and portable library)
Why not use std::thread? It's part of the C++11 standard and is as portable as I believe you need.
If not C++ standard, what about boost? I believe boost has a few more features to their threads, but still follows the way the standard threads are used.
ok c++ 11 is available? I dont know anything about the new c++, ok boost would be the one I would choose, But I did not think the std :: thread library.... nevertheless, Today I'm starting to read SDL library and that library have its own threads.... What would be the differentes If I use boost, or std::thread, or SDL thread orrrrr windows.h thread or maybe linux thread (POSIX??).. maybe the right choose, it is SDL Threads because I wanna learn that library, but if std::thread is better and work fine with SDL, then std::thread would be the best choose over boots library or even SDL, what do you things about this, if you want to learn sdl.....
PD: Sorry if my english is bad, I Don't speak your language...
If you're trying to learn SDL, use SDL threads. The only issue is that in order for someone else to compile your code, they will also have to have SDL.
C++11 has been available for quite some time now (at least most of the features have been.
There isn't much of a difference between boost/std threads, but like I said, I do believe that boost offers more features with theirs.
Using the OS threads option is always an option, but it will only work on those OS's.
Since you're learning SDL, using SDL threads will make it much easier in your programs to interact with the threads. There is so much that SDL can do so it's just a matter of learning it.