diff --git a/distributed-job-manager/src/main/java/ru/fix/distributed/job/manager/WorkPoolRunningStrategies.java b/distributed-job-manager/src/main/java/ru/fix/distributed/job/manager/WorkPoolRunningStrategies.java index 1043693..78293d8 100644 --- a/distributed-job-manager/src/main/java/ru/fix/distributed/job/manager/WorkPoolRunningStrategies.java +++ b/distributed-job-manager/src/main/java/ru/fix/distributed/job/manager/WorkPoolRunningStrategies.java @@ -15,7 +15,7 @@ private WorkPoolRunningStrategies() { @NotNull public static WorkPoolRunningStrategy getSingleThreadStrategy() { - return localWorkPool -> 1; + return localWorkPool -> localWorkPool.isEmpty()? 0 : 1; }