1

(Under software architecture/design)

I'm not sure how my question could be subjective but the message next to the title suggests that it is. I hope I'm not violating the rules here.

Under what circumstances or application would you need absolute precision with thread execution timing( thread sleep, back to life and execution with precision)?

And how do you guarantee that with Java ?

I was reading again Kathy Sierra's SCJP/OCP. It says

Just because a thread's sleep() expires, and it wakes up, does not mean it will return to running! Remember, when a thread wakes up, it simply goes back to the runnable state. So the time specified in sleep() is the minimum duration in which the thread won't run, but it is not the exact duration in which the thread won't run.

Then how do you write code for something very critical that needs absolute precision in Java?

closed as too broad by Ixrec, Bart van Ingen Schenau, AProgrammer Nov 27 '15 at 9:43

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I believe you're looking for real time Java en.wikipedia.org/wiki/Real_time_Java – Joeri Sebrechts Nov 27 '15 at 7:37
  • 2
    This question is more "too broad" than "subjective", because 1) it's asking for an open-ended list of examples (which usually isn't great on any SE site) and 2) "how do you guarantee that?" is a very broad question which probably can't be done justice in a single answer. It's better suited for a book, and since this is Java we're talking about, odds are there is a book that covers this (Joen's link is a good starting point though). If you have a specific, concrete problem that you believe you need better timing properties to solve, then we may be able to help with that. – Ixrec Nov 27 '15 at 7:48

Browse other questions tagged or ask your own question.