Results 1 to 3 of 3
  1. #1
    ersachinjain is offline Member
    Join Date
    Aug 2009
    Posts
    51
    Rep Power
    0

    Default How to stop Thread

    Hi

    I am writing a java code for multiple client-server. When the client logs off then is it like the the thread in the server is killed or do we have to explicitly kill the thread running in the server otherwise the thread will keep running. If yes then what i am doing right now is that I am simply doing object of the thread - null. Is the right way.

    Thanks

    Sachin

  2. #2
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    765
    Rep Power
    6

    Default

    check thread.isAlive() and proceed
    Ramya:cool:

  3. #3
    ersachinjain is offline Member
    Join Date
    Aug 2009
    Posts
    51
    Rep Power
    0

    Default

    Hi

    Thanks for replying. So is it like I will call this isalive() function and if it returns true I will make that thread null. Will the thread be killed then and then this thread will not exist in the server.

    Sachin

Similar Threads

  1. Thread won't stop
    By bubbless in forum Threads and Synchronization
    Replies: 15
    Last Post: 10-20-2009, 10:58 PM
  2. Forcing a thread to stop
    By sukatoa in forum Threads and Synchronization
    Replies: 7
    Last Post: 07-17-2009, 06:41 AM
  3. Help to stop a thread
    By raghu_lzybns in forum New To Java
    Replies: 4
    Last Post: 07-09-2009, 04:39 PM
  4. [SOLVED] How to stop a thread
    By AlejandroPe in forum New To Java
    Replies: 5
    Last Post: 04-29-2009, 03:05 PM
  5. how to stop a thread
    By willemjav in forum Advanced Java
    Replies: 19
    Last Post: 09-10-2008, 07:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •