Skip to content

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

Closed
@odrotbohm

Description

@odrotbohm

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.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions