Stopping, Suspending, and Resuming

Prior to JDK 1.2, it was possible for one thread to stop or suspend the execution of another thread (or itself). The stop(), suspend(), and resume() methods have been identified as problematic and are deprecated in JDK 1.2. The best way to stop a thread is to indicate to the thread that it should stop itself and have the thread return from its run() method.

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.