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

When using NonBlockingConnectionPool the ExecutorService is not shutdown on close #51

Open
markuskreusch opened this issue Nov 20, 2019 · 1 comment

Comments

@markuskreusch
Copy link

When using Database.nonBlocking() and not providing a custom scheduler the ExecutorService created is never shutdown. This will prevent JVM shutdown. The responsibility to close it lies in the library because it is created there. It is also impossible to access it through getters from the outside so closing it by hand is only possible using some weird reflection.

val db = Database.nonBlocking().build()
// use at least one connection
db.close()
// ExecutorService still running and never stopped
@davidmoten
Copy link
Owner

Quite the delay on my response on this one but looks valid. I'm looking at something else with this project right now so I'll probably address this too.

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

No branches or pull requests

2 participants