You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recent change 98159b6 addressed the major issue with InterruptedException. However there are still several things to improve:
log InterruptedException is not necessary, since user's code can't resolve it anyhow. Just found in production logs:
null
java.lang.InterruptedException
at java.base/java.util.concurrent.FutureTask.awaitDone(FutureTask.java:418)
at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:190)
at pl.edu.icm.jlargearrays.ConcurrencyUtils.waitForCompletion(ConcurrencyUtils.java:188)
at org.jtransforms.utils.CommonUtils.cftrec4_th(CommonUtils.java:8985)
the method should immediately cleanup and terminate after receiving interruption. However in couple of places computation continue:
there is no indication to the caller if computation succeeded
Just raising this issue to start discussion and get some feedback. I would fix it in the following manner:
do not log InterruptedException at all. I.e. remove Logger.getLogger(CommonUtils.class.getName()).log(Level.SEVERE, null, ex); from everywhere.
immediately return on InterruptedException. This would leave input data partially changed. With the current approach the input data might still be partially computed
with the 98159b6 the caller can check interrupted flag and abort the computation.
The text was updated successfully, but these errors were encountered:
The recent change 98159b6 addressed the major issue with InterruptedException. However there are still several things to improve:
JTransforms/src/main/java/org/jtransforms/dst/DoubleDST_2D.java
Line 133 in 7084c20
Just raising this issue to start discussion and get some feedback. I would fix it in the following manner:
Logger.getLogger(CommonUtils.class.getName()).log(Level.SEVERE, null, ex);
from everywhere.The text was updated successfully, but these errors were encountered: