Skip to content

@Async groups [SPR-9318] #13956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
spring-projects-issues opened this issue Apr 10, 2012 · 1 comment
Closed

@Async groups [SPR-9318] #13956

spring-projects-issues opened this issue Apr 10, 2012 · 1 comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: duplicate A duplicate of another issue type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Apr 10, 2012

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:

1 votes, 1 watchers

@spring-projects-issues
Copy link
Collaborator Author

spring-projects-issues commented Apr 13, 2012

Chris Beams commented

Hi Bozhidar, #11513 should take care of your use case here. If not, please comment there and explain. Thanks!

@spring-projects-issues spring-projects-issues added type: enhancement A general enhancement in: core Issues in core modules (aop, beans, core, context, expression) status: duplicate A duplicate of another issue labels Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) status: duplicate A duplicate of another issue type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant