woollen n thread 粗纺毛线
Next, Thread A resumes, and clearly *top and n->next do not match for this thread, because Thread B modified the contents of the top location.
接下来,线程 A 恢复执行,显然对于这个线程 *top 和 n->next 不匹配,因为线程 B 修改了 top 位置的内容。
As you'll recall, when you invoke the run method on an instance of Parallel, it creates (n-1) threads to run the first (n-1) CSProcess instances and runs the last CSProcess instance on its own thread.
您会想起前面介绍过,在您调用Parallel实例上的run方法时,它创建了(n - 1)个线程来运行前面(n - 1)个CSProcess实例,然后在自己的线程中运行最后一个CSProcess实例。
应用推荐