-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Describe the feature
Currently, when the application receives a SIGTERM signal, the CRT library automatically closes all resources via its shutdown hook. This behavior makes it difficult to coordinate a graceful shutdown sequence.
We’d like to make this shutdown hook configurable and expose a method to manually close and release all resources when appropriate.
Use Case
In scenarios where we implement graceful shutdown, we need to:
Stop accepting new requests.
Wait for ongoing requests to complete.
Only then close CRT-related resources.
With the current automatic shutdown behavior, CRT resources are closed before the application finishes handling in-flight requests.
Proposed Solution
Same as it is in aws-crt-java: https://github.com/awslabs/aws-crt-java/blob/main/src/main/java/software/amazon/awssdk/crt/CRT.java#L425
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change