summaryrefslogtreecommitdiffstats
path: root/daemon
diff options
context:
space:
mode:
Diffstat (limited to 'daemon')
-rw-r--r--daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java10
1 files changed, 6 insertions, 4 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 8e55e14..7b854c3 100644
--- a/daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java
+++ b/daemon/src/main/java/org/openslx/taskmanager/main/Taskmanager.java
@@ -26,7 +26,8 @@ public class Taskmanager implements FinishCallback, Runnable
private static final Logger log = Logger.getLogger( Taskmanager.class );
- private final ThreadPoolExecutor threadPool = new ThreadPoolExecutor( 4, 16, 1, TimeUnit.MINUTES, new ArrayBlockingQueue<Runnable>( 16 ) );
+ private final ThreadPoolExecutor threadPool = new ThreadPoolExecutor( 8, 32, 1, TimeUnit.MINUTES,
+ new ArrayBlockingQueue<Runnable>( 4 ) );
/**
* gson object for (de)serialization
@@ -45,9 +46,10 @@ public class Taskmanager implements FinishCallback, Runnable
private final Semaphore doCheckForWork = new Semaphore( 0 );
- /*
- * Static methods
- */
+ public Taskmanager()
+ {
+ threadPool.allowCoreThreadTimeOut( true );
+ }
/**
* Return the status of the task with the given ID. If the task does not