Skip to content

Explore object pool recycling diagnostics and check timing #324

Description

@tisonkun

An object pool needs to decide whether a resource can be reused, while applications may need to understand why it was rejected. Asyncband currently checks idle objects during checkout, discards is_recyclable errors, and retries. Returning an object does not run this check.

We would like to explore:

  • Typical uses for recycling diagnostics, such as investigating failed health checks or resets, and whether an optional error sink would help.
  • When checks belong at checkout, before return, or in caller code, including discarding an object already known to be broken.
  • Whether a separate synchronous check has a concrete benefit. Prefer asynchronous checks for operations such as network pings; a synchronous hook should need a demonstrated use case.

Contributions could start with representative use cases and a small API proposal, informed by other object pools. No breaking change or particular API is assumed by this discussion.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions