> Isn't this supposed to give me some sort of race condition? Thanks.
It can give you some sort of race condition. (depends on: is increment of an int atomic on the particular implementation?)
Most compilers will replace the loop with n += 50000, and because creation of a thread takes much longer than incrementing an integer, there may be no race condition.