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

Allow setting a minimum number of ready to use resources to be created #35

Open
ludat opened this issue Oct 24, 2020 · 1 comment
Open

Comments

@ludat
Copy link

ludat commented Oct 24, 2020

So I've got this use case where I need to connect to a db and the first connection is somewhat expensive, so I'd like to keep a connection always ready to avoid having the user waiting for the app to connect for the first time.

My idea is just like there is the maximum number of resources, there's also a minimum which never gets freed no matter what.

That could also help with #33 because if the user is eager to create the connection that would show an error immediately instead of the first time the pool needs to create a resource.

And maybe it's time to reify the settings for createPool since it starting to have too many parameters (which are similar in types but different in semantics)

Also thanks for writing such a useful library :D

@domenkozar
Copy link

For context also read https://qnikst.brick.do/2020-12-28-resource-pool

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