Skip to content

Adapt ConcurrencyThrottleSupport to use ReentrantLock for better virtual thread support #32251

Closed
@philwebb

Description

@philwebb

See spring-projects/spring-boot#39529, specifically:

The only possibility to limit the amount of parallel tasks is therefore the spring.task.execution.simple.concurrency-limit property, which essentially behaves like a max pool size. The issue I see here, is that ConcurrencyThrottleSupport, which is being used under the hood, uses the synchronized blocks which leads to thread pinning and might cause several issues with virtual threads. Maybe switching to ReentrantLock would mitigate that?

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions