Threads should be designed so that the run( ) method periodically checks to see if the thread should suspend, resume, or stop its own execution, which is usually accomplished by establishing two-flag variables, one flag for suspend and resume, and one flag for stop, and the following rules: