git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-3878 update branch from 2.12 merge from 2.11.2
[jalview.git]
/
src
/
jalview
/
workers
/
AlignCalcManager2.java
diff --git
a/src/jalview/workers/AlignCalcManager2.java
b/src/jalview/workers/AlignCalcManager2.java
index
eba241a
..
1d5c1ed
100644
(file)
--- a/
src/jalview/workers/AlignCalcManager2.java
+++ b/
src/jalview/workers/AlignCalcManager2.java
@@
-111,19
+111,15
@@
public class AlignCalcManager2 implements AlignCalcManagerI2
task = executor.submit(() -> {
try
{
task = executor.submit(() -> {
try
{
- Console.debug(format("Worker %s started",
- getWorker().getClass().getName()));
+ Console.debug(format("Worker %s started", getWorker()));
getWorker().run();
getWorker().run();
- Console.debug(format("Worker %s finished",
- getWorker().getClass().getName()));
+ Console.debug(format("Worker %s finished", getWorker()));
} catch (InterruptedException e)
{
} catch (InterruptedException e)
{
- Console.debug(format("Worker %s interrupted",
- getWorker().getClass().getName()));
+ Console.debug(format("Worker %s interrupted", getWorker()));
} catch (Throwable th)
{
} catch (Throwable th)
{
- Console.debug(format("Worker %s failed",
- getWorker().getClass().getName()), th);
+ Console.debug(format("Worker %s failed", getWorker()), th);
} finally
{
if (!isRegistered())
} finally
{
if (!isRegistered())
@@
-142,8
+138,7
@@
public class AlignCalcManager2 implements AlignCalcManagerI2
{
return;
}
{
return;
}
- Console.debug(format("Cancelling worker %s",
- getWorker().getClass().getName()));
+ Console.debug(format("Cancelling worker %s", getWorker()));
task.cancel(true);
}
}
task.cancel(true);
}
}
@@
-177,7
+172,7
@@
public class AlignCalcManager2 implements AlignCalcManagerI2
"Cannot submit new task if the prevoius one is still running");
}
Console.debug(
"Cannot submit new task if the prevoius one is still running");
}
Console.debug(
- format("Worker %s queued", getWorker().getClass().getName()));
+ format("Worker %s queued", getWorker()));
final var runnable = new Runnable()
{
private boolean started = false;
final var runnable = new Runnable()
{
private boolean started = false;
@@
-193,26
+188,22
@@
public class AlignCalcManager2 implements AlignCalcManagerI2
{
if (!started)
{
{
if (!started)
{
- Console.debug(format("Worker %s started",
- getWorker().getClass().getName()));
+ Console.debug(format("Worker %s started", getWorker()));
getWorker().startUp();
started = true;
}
else if (!completed)
{
getWorker().startUp();
started = true;
}
else if (!completed)
{
- Console.debug(format("Polling worker %s",
- getWorker().getClass().getName()));
+ Console.debug(format("Polling worker %s", getWorker()));
if (getWorker().poll())
{
if (getWorker().poll())
{
- Console.debug(format("Worker %s finished",
- getWorker().getClass().getName()));
+ Console.debug(format("Worker %s finished", getWorker()));
completed = true;
}
}
} catch (Throwable th)
{
completed = true;
}
}
} catch (Throwable th)
{
- Console.debug(format("Worker %s failed",
- getWorker().getClass().getName()), th);
+ Console.debug(format("Worker %s failed", getWorker()), th);
completed = true;
}
if (completed)
completed = true;
}
if (completed)
@@
-220,8
+211,7
@@
public class AlignCalcManager2 implements AlignCalcManagerI2
final var worker = getWorker();
if (!isRegistered())
PollableWorkerManager.super.worker = null;
final var worker = getWorker();
if (!isRegistered())
PollableWorkerManager.super.worker = null;
- Console.debug(format("Finalizing completed worker %s",
- worker.getClass().getName()));
+ Console.debug(format("Finalizing completed worker %s", worker));
worker.done();
// almost impossible, but the future may be null at this point
// let it throw NPE to cancel forcefully
worker.done();
// almost impossible, but the future may be null at this point
// let it throw NPE to cancel forcefully
@@
-239,8
+229,7
@@
public class AlignCalcManager2 implements AlignCalcManagerI2
{
return;
}
{
return;
}
- Console.debug(format("Cancelling worker %s",
- getWorker().getClass().getName()));
+ Console.debug(format("Cancelling worker %s", getWorker()));
task.cancel(false);
executor.submit(() -> {
final var worker = getWorker();
task.cancel(false);
executor.submit(() -> {
final var worker = getWorker();
@@
-249,8
+238,7
@@
public class AlignCalcManager2 implements AlignCalcManagerI2
if (worker != null)
{
worker.cancel();
if (worker != null)
{
worker.cancel();
- Console.debug(format("Finalizing cancelled worker %s",
- worker.getClass().getName()));
+ Console.debug(format("Finalizing cancelled worker %s", worker));
worker.done();
}
});
worker.done();
}
});