v1.1.1 Release Notes
REFACTOR
- Changed
PresetConfig.Priority from string to Priority type
- Changed
WithRetry parameter from *int to variadic ...int, supports invocation without arguments
UPDATE
- Improved
timeout calculation logic, now directly uses time.Duration operations
- Updated priority upgrade logic to use new priority constants instead of strings
PERF
- Added
taskHeap capacity reduction mechanism: when usage drops below 1/4 of capacity, automatically shrinks to half (minimum retained is 16)
REMOVE
- Removed
getPresetPriority function
- Set
old[n-1] = nil in Pop() to avoid memory leaks
REFACTOR
- 將
PresetConfig.Priority 從 string 改為 Priority 型別,移除字串解析邏輯
- 將
WithRetry 參數從 *int 改為變長參數 ...int,支援無參數調用
UPDATE
- 改進
timeout 計算邏輯,直接使用 time.Duration 運算
- 更新優先級升級邏輯,使用新的優先級常數替代字串
PERF
- 新增
taskHeap cap 縮減機制,當使用量低於容量 1/4 時自動縮減至一半(最小保留 16)
REMOVE
- 移除
getPresetPriority 函式
- 在
Pop() 中設置 old[n-1] = nil 避免記憶體洩漏