@vaualbus The most recent non-beta version. I believe the number was 1.6 can't remember perfectly but unless you want to use sfml for other things, I would recommend looking into boost::thread (or std::thread if you have a C++0X fully supporting compiler).
@1dayitwillmake Yes I'm aware, at the time of the video I am not entirely sure what led me to do sfml except that I had been using it recently. I also wanted to showcase the use of a library, even if I didn't explain it. Anyway it may have been better if I used boost, and I might do another series on boost and make a video for the multithreading there.
That's NOT what 'volatile' does. All it does is force the compiler to not cache the value in registers and read the value from memory each time it's accessed. Your counter++ problem could have been solved with atomic operations, mutexes are overkill for it.
msdn microsoft com/en-us/library/ms683614(v=vs.85).aspx
what version of sfml do you use??
vaualbus 4 weeks ago
@vaualbus The most recent non-beta version. I believe the number was 1.6 can't remember perfectly but unless you want to use sfml for other things, I would recommend looking into boost::thread (or std::thread if you have a C++0X fully supporting compiler).
Mr4thdimention 3 weeks ago
Good video btw
1dayitwillmake 4 months ago
Howcome you're not using Boost. It is std::thread of C++0X
1dayitwillmake 4 months ago
@1dayitwillmake Yes I'm aware, at the time of the video I am not entirely sure what led me to do sfml except that I had been using it recently. I also wanted to showcase the use of a library, even if I didn't explain it. Anyway it may have been better if I used boost, and I might do another series on boost and make a video for the multithreading there.
Mr4thdimention 4 months ago
That's NOT what 'volatile' does. All it does is force the compiler to not cache the value in registers and read the value from memory each time it's accessed. Your counter++ problem could have been solved with atomic operations, mutexes are overkill for it.
msdn microsoft com/en-us/library/ms683614(v=vs.85).aspx
iddn 7 months ago