• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TimerTask cancel()

 
Raj Ohadi
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
TimerTask has a cancel() method. If I have a repeated run schedule, this call forces the next scheduled run not to happen. But does it kill the thread ?
 
Henry Wong
author
Marshal
Pie
Posts: 21190
80
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Raj Ohadi:
TimerTask has a cancel() method. If I have a repeated run schedule, this call forces the next scheduled run not to happen. But does it kill the thread ?


No, it does not kill the thread. If you want to do that, you need to call the cancel() method of the Timer itself.

Henry
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic