Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

URG & IMP: How does one stop the Thread.currentThread?

843829Feb 9 2006 — edited Feb 27 2006
hi,

I want to stop the current thread.

Presently teh code used Thread.currentThread.stop()

However stop() has been deprecated

Thread.currentThread.interrupt() doesnot seem to help.

If I try Thread.currentThread.isAlive() post tehinterrupt, it doesnot work as desired and teh thread is still active...

Any pointers????

We have alreday tried using the boolean volatile varible to stop the thread as recommended by sun and since this is the currentThread, it cannot be assigned to null.

Thanks
Priya
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 27 2006
Added on Feb 9 2006
8 comments
192 views