When the following code is run, it launches the thread r, as the output from it is received but the test phrase is never outputted though there are no errors outputted that would suggest an error. Why is this not able to progress past the thread launch? Will it wait for the thread to be stopped before continuing?
while(xis your thread spinning hard? it won't wait for the thread to stop. though your code is dangerous as the thread goes out of scope so you won't join it back later.
以上就是Unreachable expression after launch of new thread.的详细内容，更多请关注web前端其它相关文章！