Singletons, Critical Sections, and Reader/Writer Locks
This chapter adds a few more tools to your mutithreading arsenal: I’ll discuss Singletons (one-of-a kind objects) and critical sections (blocks of code that can be executed by only one thread at a time). Singletons in particular, are surprisingly difficult to implement efficiently in a multithreaded environment, but are essential in most programs (java.awt.Toolkit is an example of a Singleton).
KeywordsClass Object Critical Section Color Scheme Read Operation Public Class
Unable to display preview. Download preview PDF.