| In this chapter, I showed you a technique for creating active classes that are self-running. Self-running classes automatically create an internal thread that runs inside the object. This thread is usually started in the constructor, but can be started later if necessary. Users of self-running objects do not need to concern themselves with the details of creating and starting a thread for an objectin fact, they dont even need to know that a thread is running inside it at all. Additionally, because the users of a self-running object do not have a reference to the internal thread, they cannot erroneously use deprecated methods to suspend or stop the thread at a bad time. | |