Chapter 4. Composing Objects(合成对象)

Chapter 4. Composing Objects(组合对象)
So far, we've covered the low-level basics of thread safety and synchronization. But we don't want to have to analyze each memory access to ensure that our program is thread-safe; we want to be able to take thread-safe components and safely compose them into larger components or programs. This chapter covers patterns for structuring classes that can make it easier to make them thread-safe and to maintain them without accidentally undermining their safety guarantees.
在前几章中,我们已经涉及到了关于线程安全和同步机制的基础的底层概念。但是我们实在不想通过逐次分析内存的访问来确保我们的程序的线程安全性,我们想要的是获得线程安全的组件,并将这些组件安全的嵌入到我们的系统中。在本章中,我们将会讨论如何来构建线程安全的类,如何维护这些类以确保不会发生由于不小心而破坏安全性的情况。

你可能感兴趣的:(thread,Access)