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.
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_recyclableerrors, and retries. Returning an object does not run this check.We would like to explore:
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.