Does a thread start have implicit memory barrier?
问题 i.e. when I start a new thread, is it safe to read any variables initialized before the thread start from the newly started thread? UPD why I'm asking? Because some developers assume that it does have, and don't use any explicit memory barriers there. And I couldn't reproduce any bugs in that code. However, documentation http://msdn.microsoft.com/en-us/library/ms686355(v=vs.85).aspx doesn't say this is safe. 回答1: Yes, the operating system provides the implicit barrier. It can't get the thread