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

Please provide a method to shutdown thread pool used in com.sendgrid.BaseInterface.attempt #731

Open
taksatou opened this issue Apr 11, 2022 · 1 comment

Comments

@taksatou
Copy link

taksatou commented Apr 11, 2022

Issue Summary

Please provide a method to shutdown thread pool used in com.sendgrid.BaseInterface.attempt.
Even after com.sendgrid.SendGrid instance is discarded, the thread pool is still alive and it prevents the JVM process from exiting.

Steps to Reproduce

Just call com.sendgrid.BaseInterface.attempt, and then, the JVM process won't exit.

Technical details:

  • sendgrid-java version: 4.7.6
  • java version: openjdk version "16.0.2" 2021-07-20
@jackcviers
Copy link

Agreed it should implement AutoCloseable. The close method can use awaitTermination while catching the InterruptedException to implement the close method, just like in the example under ExecutorService.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants