Hopw to Stop Thread in Java with Code Sample

Tutorials Shared by the Internet Community

Advertisements


Synopsis

After deprecation of Stop method on Thread Class, there is no standard way to stop or kill a thread in Java, there is no API method which can stop thr

Statistics

  • Total Hits - 26950

  • Total Votes - 96 votes

  • Vote Up - 41 votes

  • Vote Down - 55 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Core JAVA

  • Submitted By - Javin Paul

  • Submitted on - 2011-11-02 06:16:21

Description

After deprecation of Stop method on Thread Class, there is no standard way to stop or kill a thread in Java, there is no API method which can stop threads. What Java Programmer uses it is the property that once a Thread completes execution of run() method of Runnable class, it is dead. This article gives a code sample to stop a Thread in Java with clear explanation. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements