30.3.1.2 thread constructors
template <class F, class ...Args> explicit thread(F&& f, Args&&... args);
Synchronization: The completion of the invocation of the constructor synchronizes with the beginning of the invocation of the copy of
f
.
In other words: when the thread function gets invoked, it is synchronized with everything that happened in the parent thread up until std::thread
gets constructed, in the parent thread.
No explicit memory barriers/fences, of this kind, are needed.