Restarting a dead thread


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Restarting a dead thread

  1. #1
    Join Date
    Apr 2003
    Posts
    4

    Restarting a dead thread

    I need to restart a thread that has died. I tried calling the start() method again, but nothing happened. How do I do it? Is it impossible?

  2. #2
    Join Date
    Mar 2003
    Posts
    834

    Thumbs down

    You can't do it. It's impossible.

    The only way to do it is to catch the thread before it dies and then get it to wait for a signal from you to continue.

    ArchAngel.
    ArchAngel.
    O:-)

  3. #3
    Join Date
    Mar 2003
    Posts
    86

    Run for ever

    What you can do is to have the thread run in a loop, chcecking a condition before each run. When you want to realy stop the thread, change it's condition.

  4. #4
    Join Date
    Apr 2003
    Posts
    4

    Smile Thanks!

    I'm just testing out a forever loop in run().

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center