Skip to Main Content

Java Programming

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!

How to kill a thread

807589Oct 23 2008 — edited Oct 24 2008
Hello.

I would like to kill a thread. For now, im doing like that:
                if (this.searchEngine.isAlive()) {
                    this.searchEngine.interrupt();
                }
But it seems it never ends the thread. I think it interrupts the thread, and lets other threads finish; then, it conintues until this.searcEngine thread ends. I would like absolutly destroy this thread and free its memory. How can i do it? I didnt find any non-deprecated solution in API.

Thank you.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 21 2008
Added on Oct 23 2008
13 comments
326 views