Skip to content

Quitting quarkus:dev with Ctrl+C doesn't allow @PreDestroy hooks to finish #12723

@derekm

Description

@derekm

Describe the bug
When exiting quarkus:dev mode with Ctrl+C, @PreDestroy hooks rarely have enough time to complete.

Expected behavior
Other CDI containers I've used trap the Ctrl+C signal to finish completion of all @PreDestroy hooks before exiting the container.

Actual behavior
@PreDestroy appear to be called, but it looks like thread pools are terminated before they're done executing. I only rarely see the results of print statements I have in my @PreDestroy hooks.

To Reproduce
Set up a @PreDestroy hook with some print statements. Exit from an mvn compile quarkus:dev session, and see that the print statements infrequently execute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/arcIssue related to ARC (dependency injection)area/devmodekind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions