feat: add WithMinWorkers option
1. Are you opening this pull request for bug-fixs, optimizations or new feature?
New feature
2. Please describe how these code changes achieve your intention.
Added a new option WithMinWorkers(n) so the pool never drops below n idle workers when purging.
3. Please link to the relevant issues (if any).
n/a
4. Which documentation changes (if any) need to be made/updated because of this PR?
It's already contains generic Options reference to godoc
4. Checklist
- [x] I have squashed all insignificant commits.
- [x] I have commented my code for explaining package types, values, functions, and non-obvious lines.
- [x] I have written unit tests and verified that all tests passes (if needed).
- [x] I have documented feature info on the README (only when this PR is adding a new feature).
- [x] (optional) I am willing to help maintain this change if there are issues with it later.
Why do you need this? What use cases can benefit from this?
To avoid power spikes in normal/predicted highload scenarios while still having a room for unexpected bursts.
This PR is marked as stale because it has been open for 21 days with no activity.
You should take one of the following actions:
- Manually close this PR if it is no longer relevant
- Push new commits or comment if you have more information to share
This PR will be automatically closed in 7 days if no further activity occurs.
This PR was closed because it has been inactive for 7 days since being marked as stale.
If you believe this is a false alarm, feel free to reopen this PR or create a new one.