Skip to content

Commit

Permalink
tweak thread pool startup log msgs
Browse files Browse the repository at this point in the history
  • Loading branch information
codeforkjeff committed Mar 5, 2017
1 parent bc3915f commit 598d31c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/codefork/refine/ThreadPool.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ public ThreadPool(long waitPeriodBeforeShrinkingMs,

public void start() {
// TODO: make thread pool size configurable
log.info("Starting thread pool, size = " + INITIAL_POOL_SIZE);
if(executor == null || executor.isShutdown()) {
log.info("Starting thread pool, size = " + INITIAL_POOL_SIZE);
executor = new ThreadPoolExecutor(INITIAL_POOL_SIZE, INITIAL_POOL_SIZE, 0, TimeUnit.HOURS, new LinkedBlockingQueue<Runnable>());
} else {
log.info("Thread pool already started, doing nothing.");
}
}

Expand Down

0 comments on commit 598d31c

Please sign in to comment.