diff --git a/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java b/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java index 71a168a4..f60dc575 100644 --- a/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java +++ b/docs-core/src/main/java/com/sismics/docs/core/model/context/AppContext.java @@ -171,7 +171,7 @@ public class AppContext { if (EnvironmentUtil.isUnitTest()) { return new EventBus(); } else { - int threadCount = Runtime.getRuntime().availableProcessors() / 2; + int threadCount = Math.max(Runtime.getRuntime().availableProcessors() / 2, 2); ThreadPoolExecutor executor = new ThreadPoolExecutor(threadCount, threadCount, 1L, TimeUnit.MINUTES, new LinkedBlockingQueue<>());