diff options
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java b/daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java index 1325dca..69c190a 100644 --- a/daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java +++ b/daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java @@ -38,9 +38,7 @@ public class Taskmanager implements FinishCallback, Runnable private final Map<String, Class<? extends AbstractTask>> tasks = new ConcurrentHashMap<>(); /** - * All the running/finished task instances. The mainloop will call wait() on this and this object - * is notified as soon as the mainloop should check if there is any task available that can be - * run. + * All the running/finished task instances. */ private final Map<String, AbstractTask> instances = new ConcurrentHashMap<>(); @@ -166,6 +164,7 @@ public class Taskmanager implements FinishCallback, Runnable if ( task.canStart() ) { log.debug( "Started Task " + task.getClass().getSimpleName() + " (" + task.getId() + ")" ); threadPool.execute( task ); + task.markAsStarting(); } } } catch ( RejectedExecutionException e ) { |