Add explicit note on blocking in case of concurrency limit

Closes gh-33873
This commit is contained in:
Juergen Hoeller
2024-11-13 15:09:02 +01:00
parent df376d9343
commit 01c85b1afb

View File

@@ -196,6 +196,11 @@ public class SimpleAsyncTaskExecutor extends CustomizableThreadCreator
* The default of -1 indicates no concurrency limit at all.
* <p>This is the equivalent of a maximum pool size in a thread pool,
* preventing temporary overload of the thread management system.
* However, in contrast to a thread pool with a managed task queue,
* this executor will block the submitter until the task can be
* accepted when the configured concurrency limit has been reached.
* If you prefer queue-based task hand-offs without such blocking,
* consider using a {@code ThreadPoolTaskExecutor} instead.
* @see #UNBOUNDED_CONCURRENCY
* @see org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor#setMaxPoolSize
*/