Skip to content

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

@ludat

Description

@ludat

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions