Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Who clean up finished Timer's threads?

 
tom chansky
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a Timer class is scheduled to perform a certain task repeatedly, and when a scheduled task is finished, who will clean up or terminate or stop that thread? Is there anything that I can do to make sure those finished threads are cleaned up so that they will not occupy resources.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you try the JavaDoc for Timer? It talks about how Timers end, good or bad. You might make the Timer a daemon or cancel it at shutdown. I'm thinking I've never done that but never had any problems either. But I'm not so sure about the no problems.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic