I am planning to create a thread which will behave like a timer. I will use sleep to retrigger the operation after specific delay..
I am worried if JVM can abruptly kill my thread without closing the application,
So if app is running and this thread dies my feature won't be able to get a fresh token.
Either I will have to write some manual feature to restart it.
So my question is: Can JVM abruptly kill any thread?
What is the best solution to schedule a task? Since my task execution time is coming at runtime I can't use fixed schedule executors.