Showing posts with label stoping. Show all posts
Showing posts with label stoping. Show all posts

Saturday, 25 January 2014

Suspending,Resuming,and Stoping Thread using java 2

modern way of suspending,resuming,stoping:...

The Modern Way of Suspending, Resuming, and Stopping Threads


The Modern Way of Suspending, Resuming, and Stopping Threads While the suspend(),resume( ), andstop( ) methods defined by Thread seem to be a perfectly reasonable and convenient approach to managing the execution of threads, they must not be used for new Java programs.

Suspending


The suspend( ) method of theThread class was deprecated by Java 2 several years ago. This was done because suspend( ) can sometimes cause serious system failures. Assume that a