Skip to content
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

ExecutorLifecycleDelegate should call ExecutorService.isTerminated() in ….isRunning() #31549

Closed
odrotbohm opened this issue Nov 3, 2023 · 0 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: bug A general bug
Milestone

Comments

@odrotbohm
Copy link
Member

The verification of whether an ELD is currently running is implemented by calling ExecutorService.isShutdown() which only indicates whether the service is currently shutting down, not whether it has fully shut down already. This causes the Lifecycle.stop() invocations of components working with an ELD (ThreadPoolTaskExecutor, for example) not waiting for the service to fully stop before moving on to process other Lifecycle implementations.

This might leave threads executing methods to work with resources that are prematurely shutdown by follow-up resources managed in downstream Lifecycle implementations.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 3, 2023
@snicoll snicoll added type: bug A general bug in: core Issues in core modules (aop, beans, core, context, expression) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 3, 2023
@snicoll snicoll added this to the 6.1.0 milestone Nov 3, 2023
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) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants