@Async groups [SPR-9318] #13956
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: duplicate
A duplicate of another issue
type: enhancement
A general enhancement
Bozhidar Bozhanov opened SPR-9318 and commented
Currently all
@Async
methods are executed using the same thread pool. But often you need different groups of related async operations and you don't want them to share the same pool. For example, a scheduled job may want to asynchronously invoke a method multiple times, but if it uses@Async
it will consume all the threads that are supposed to be used by other processes.That's why I suggest to add an async group.
@Async
(group="main"),@Async
(group="calculations"), etc. Each of them will have a separate pool.<task:executor id="mainExecutor" pool-size="100" group="main" />
<task:executor id="calcExecutor" pool-size="20" group="calculations" />
<task:annotation-driven executors="mainExecutor,calcExecutor" /> (or a nested <list>)
Affects: 3.1.1
Issue Links:
@Async
("duplicates")1 votes, 1 watchers
The text was updated successfully, but these errors were encountered: