3 ms·
It presumably checks launched just before the while loop, after the start_thread call is complete, under the assumption that whatever start_thread might have do
by to3m 13y ago
It presumably checks launched just before the while loop, after the start_thread call is complete, under the assumption that whatever start_thread might have done to that variable has been done. (An implementation could have some kind of markup on the thread creation function so that the compiler can infer the pointed-at memory has become volatile... but I doubt anybody actually does that. Much easier to let the code fuck up and blame the programmer ;))