You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/06/25 09:29:04 UTC
[camel] branch main updated: camel-core - cached thread pool may
have its use, so lets not deprecate it.
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 9425dff camel-core - cached thread pool may have its use, so lets not deprecate it.
9425dff is described below
commit 9425dffa8fdd66c3d4e285f03a54808cbfb491d7
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Jun 25 11:28:27 2021 +0200
camel-core - cached thread pool may have its use, so lets not deprecate it.
---
.../src/main/java/org/apache/camel/spi/ExecutorServiceManager.java | 4 ++--
.../src/main/java/org/apache/camel/spi/ThreadPoolFactory.java | 1 -
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/ExecutorServiceManager.java b/core/camel-api/src/main/java/org/apache/camel/spi/ExecutorServiceManager.java
index 9a3fb42..47c352b 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/ExecutorServiceManager.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/ExecutorServiceManager.java
@@ -219,13 +219,13 @@ public interface ExecutorServiceManager extends ShutdownableService, StaticServi
/**
* Creates a new cached thread pool.
* <p/>
- * <b>Important:</b> Using cached thread pool is discouraged as they have no upper bound and can overload the JVM.
+ * <b>Important:</b> Using cached thread pool should be used by care as they have no upper bound on created threads,
+ * and have no task backlog, and can therefore overload the JVM.
*
* @param source the source object, usually it should be <tt>this</tt> passed in as parameter
* @param name name which is appended to the thread name
* @return the created thread pool
*/
- @Deprecated
ExecutorService newCachedThreadPool(Object source, String name);
/**
diff --git a/core/camel-api/src/main/java/org/apache/camel/spi/ThreadPoolFactory.java b/core/camel-api/src/main/java/org/apache/camel/spi/ThreadPoolFactory.java
index 8321ac1..62c3794 100644
--- a/core/camel-api/src/main/java/org/apache/camel/spi/ThreadPoolFactory.java
+++ b/core/camel-api/src/main/java/org/apache/camel/spi/ThreadPoolFactory.java
@@ -44,7 +44,6 @@ public interface ThreadPoolFactory {
* @param threadFactory factory for creating threads
* @return the created thread pool
*/
- @Deprecated
ExecutorService newCachedThreadPool(ThreadFactory threadFactory);
/**