In currentThread ?? Phhhew ... Verification after each step of the calculation Well, if your "expensive calculation" can be divided into several stages or have iterative logic, you can capture the time when you start, and then periodically check between steps. This is by no means a general solution, but it will work.
For a more general solution, you can use aspects or annotation processing that automatically puts your code with these checks. If the βcheckβ tells you that your time is not returning, then no.
Think of a solution in java quickly using annotations and an annotation handler ...
public abstract Answer{} public class Some extends Answer {public Answer(double answer){answer=answer}Double answer = null;} public class None extends Answer {}
n4rzul
source share