DEV Community

邱敬幃 Pardn Chiu
邱敬幃 Pardn Chiu

Posted on

GO-QUEUE@v1.1.1: Priority-based task queue with automatic timeout promotion

cover


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

©️ 2025 邱敬幃 Pardn Chiu

Top comments (0)