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
Fixed Window Policy: Windows are distinct and do not overlap. This approach has a low performance overhead, and can ensure an even distribution of tasks if a relatively short window duration is chosen.
Backpressure Control: Ideal for job workers and background services. Concurrency control alone isn't sufficient to ensure stability and performance if backpressure control is overlooked. For example, when message queues are involved, overlooking backpressure control can lead to messages accumulating over a long period, potentially reaching their TTL.
Graceful Termination: Await the completion of all currently executing tasks via the waitForAllExecutingTasksToComplete method.
High Efficiency ⚙️: All state-altering operations have a constant time complexity, O(1).
Comprehensive documentation 📚: The class is thoroughly documented, enabling IDEs to provide helpful tooltips that enhance the coding experience.
Robust Error Handling: Uncaught errors from background tasks triggered by startExecution are captured and can be accessed using the extractUncaughtErrors method.
Fully covered by rigorous unit tests.
Self-explanatory method names.
No external runtime dependencies: Only development dependencies are used.
ES2020 Compatibility: The tsconfig target is set to ES2020, ensuring compatibility with ES2020 environments.