Releases: ori88c/starvation-free-priority-queue
Releases · ori88c/starvation-free-priority-queue
First Release
Key Features
- Starvation Free: A user-defined
maxDeferment
parameter ensures that low-priority items are delayed by no more thanmaxDeferment
pop attempts. This balanced approach makes the implementation ideal for task scheduling where fairness is critical, while still honoring priorities, however in batches which are determined according to arrival time. - Efficiency ⚙️: The push operation has a worst-case complexity of O(1). The pop operation features amortized complexity of O(log(
maxDeferment
)), a best-case complexity of O(1), and a worst-case complexity of O(maxDeferment
* log(maxDeferment
)) when a new frontier is populated. - Comprehensive Documentation 📚: The class is thoroughly documented, enabling IDEs to provide helpful tooltips that enhance the coding experience.
- Tests 🧪: Fully covered by comprehensive unit tests.
- TypeScript support.
- ES2020 Compatibility: The
tsconfig
target is set to ES2020, ensuring compatibility with ES2020 environments.