清单 3 中的代码展示了用多线程加以说明的和清单 1 相同的问题。
The code in Listing 3 exhibits the same problem as demonstrated with multiple threads and Listing 1.
这种并行性(或多线程)问题在于确保您希望为其更新信息的线程,仅影响正在处理的数据和信息。
This issue with concurrency (or multi-threading) is ensuring that threads that you want to update the information with only affect the data and information you are processing.
可以用它们来解决普通的和高级的并发性问题,现在应当可以让您开始编写所喜爱(也没有错误)的多线程程序了。
They can be used to resolve both normal and advanced concurrency issues and should get you started writing pain-free (as well as error-free!) multithreaded programs.
应用推荐