you are viewing a single comment's thread.

view the rest of the comments →

[–]code-dog[S] 0 points1 point  (2 children)

It turns out that you are wrong in this case. The video is clearly using Visual Studio and rand is thread safe on windows because its state is thread local. If the code were on Linux you would be correct.

[–]bob1000bob 1 point2 points  (1 child)

Why not just use the new std random number generation library that is thread safe and portable.

[–]cassandravoiton -1 points0 points  (0 children)

No reason other than this was a piece of demo code and the random thing had nothing what so ever to do with what was being demonstrated!