You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor worker pool for better scalability and readability
- Split `executeTask` function into `executeTaskWithTimeout` and `executeTaskWithoutTimeout` for better readability.
- Move worker pool scaling logic into a separate goroutine that runs periodically, improving scalability and making the `dispatch` function simpler.
- Add `retryCount` and `adjustInterval` fields to the `goPool` struct to support task retry and adjustable worker scaling intervals.
- Update tests and README to reflect these changes.
Signed-off-by: Daniel Hu <[email protected]>
0 commit comments