
20 Oct
2011
20 Oct
'11
2:57 p.m.
Hello all, I have a basic question about threads: can one assume that the thread is started after the constructor call (or when using create_thread in thread groups) or does one has to use an extra synchronization primitive (e.g. a barrier)? Example (real world is more complex): void g(int* x) { int x1 = *x; } void f() { int x = 0; boost::thread thd(&g, &x); //<-- thread is started or not? }