awesome-repositories.com
博客
awesome-repositories.com

通过 AI 驱动的搜索,发现最优秀的开源仓库。

探索精选搜索开源替代品自托管软件博客网站地图
项目关于排名机制媒体报道MCP 服务器
法律隐私政策服务条款
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
sindresorhus avatar

sindresorhus/p-queue

0
View on GitHub↗
4,217 星标·208 分支·TypeScript·MIT·3 次浏览

P Queue

p-queue 是一个 JavaScript Promise 队列和并发任务调度器,旨在限制活动异步操作的数量。它作为一个异步速率限制器和 Promise 生命周期管理器,以防止资源耗尽。

该项目以基于优先级的任务调度和令牌桶速率限制来控制执行频率而脱颖而出。它与用于任务取消的中止信号集成,并提供暂停、恢复和清除挂起操作的机制。

该工具涵盖了更广泛的流量管理能力,包括操作超时和并发限制。它还包括用于跟踪队列状态和挂起任务计数的监控原语,以及用于队列空闲的同步机制。

Features

  • Asynchronous Task Schedulers - Provides a comprehensive system for dispatching and executing asynchronous tasks with priority and concurrency control.
  • Task Queues - Provides a JavaScript promise queue for managing asynchronous tasks with strict concurrency limits.
  • Token Bucket Implementations - Implements a token-bucket algorithm to cap the execution frequency of tasks over a fixed time window.
  • Queue Priority Scheduling - Supports priority-based task scheduling to ensure critical operations are processed before lower-priority ones.
  • Concurrency Semaphores - Uses semaphore-like logic to limit the number of active promises running simultaneously.
  • Concurrent Task Limiters - Caps the number of parallel tasks executing to manage system resource consumption.
  • Concurrent Task Schedulers - Ships a scheduler that controls the number of active promises and manages task priority and timeouts.
  • Task Priority Execution - Implements priority levels for tasks to ensure that critical work is executed before lower-priority operations.
  • Rate Limiters - Implements application-level rate limiting using token bucket and fixed window algorithms.
  • Concurrency Limiting - Restricts the number of concurrent asynchronous operations to prevent system resource exhaustion.
  • Queue Pause and Resume Controls - Allows the queue to be paused and resumed to synchronize background work with application state.
  • Graceful Queue Draining - Provides a promise that resolves only after all active and pending tasks are fully processed.
  • AbortSignal Cancellations - Integrates with AbortSignals to allow both pending and active tasks to be cancelled immediately.
  • AbortSignal Integrations - Provides integration with standard browser AbortSignals to trigger the immediate removal or termination of pending tasks.
  • Async Operation Timeouts - Provides the ability to set maximum execution durations for queued tasks to prevent hanging operations.
  • Idle State Synchronization - Provides a synchronization mechanism that resolves promises only after the queue is empty and all active tasks finish.
  • API Rate Limiting - Controls the frequency of outgoing network requests to comply with external API rate limits.
  • Promise Lifecycle Managers - Manages the lifecycle of promises including the ability to pause, resume, and clear pending operations.
  • Concurrency Control - Manage promise execution with concurrency control.
  • Promise Utilities - Manages promise execution with concurrency control.
  • Works with AVA - Listed in the “Works with AVA” section of the Awesome Ava awesome list.

Star 历史

sindresorhus/p-queue 的 Star 历史图表sindresorhus/p-queue 的 Star 历史图表

AI 搜索

探索更多 awesome 仓库

用简单的语言描述您的需求 —— AI 将根据相关性为您从数千个精选开源项目中进行排序。

Start searching with AI

常见问题解答

sindresorhus/p-queue 是做什么的?

p-queue 是一个 JavaScript Promise 队列和并发任务调度器,旨在限制活动异步操作的数量。它作为一个异步速率限制器和 Promise 生命周期管理器,以防止资源耗尽。

sindresorhus/p-queue 的主要功能有哪些?

sindresorhus/p-queue 的主要功能包括:Asynchronous Task Schedulers, Task Queues, Token Bucket Implementations, Queue Priority Scheduling, Concurrency Semaphores, Concurrent Task Limiters, Concurrent Task Schedulers, Task Priority Execution。

sindresorhus/p-queue 有哪些开源替代品?

sindresorhus/p-queue 的开源替代品包括: jhalterman/failsafe — Failsafe is a JVM resilience library providing a collection of fault tolerance patterns for Java applications. It… taskforcesh/bullmq — BullMQ is a Redis-backed message queue library and background processor designed for distributed task queueing. It… ruby-concurrency/concurrent-ruby — Concurrent Ruby is a comprehensive concurrency toolkit for the Ruby language that provides thread-safe data… jeffail/tunny — Tunny is a worker pool library and concurrency manager for Go. It functions as a concurrent task scheduler that limits… stephencleary/asyncex — AsyncEx is a .NET asynchronous synchronization library providing a collection of primitives to coordinate tasks and… bogdanp/dramatiq — Dramatiq is a distributed task queue and workload manager used to offload function execution to background workers. It…

P Queue 的开源替代方案

相似的开源项目,按与 P Queue 的功能重合度排序。
  • jhalterman/failsafejhalterman 的头像

    jhalterman/failsafe

    4,307在 GitHub 上查看↗

    Failsafe is a JVM resilience library providing a collection of fault tolerance patterns for Java applications. It functions as an asynchronous execution wrapper that runs tasks in the background and returns futures to prevent thread blocking. The library allows for the composition of resilience policies, enabling multiple patterns to be stacked into a sequential pipeline. It includes specific implementations for circuit breaking to prevent system overload, rate limiting to control traffic flow, and a framework for managing retries and fallbacks. Capability areas cover traffic management thro

    Java
    在 GitHub 上查看↗4,307
  • taskforcesh/bullmqtaskforcesh 的头像

    taskforcesh/bullmq

    8,432在 GitHub 上查看↗

    BullMQ is a Redis-backed message queue library and background processor designed for distributed task queueing. It functions as a distributed queue manager and task scheduler, utilizing Redis to manage asynchronous job processing and persistence. The system distinguishes itself through its role as a job workflow orchestrator, enabling the definition of complex parent-child job dependencies and hierarchies for multi-step workflows. It provides sandboxed process execution to isolate heavy workloads and prevent event loop blocking, alongside distributed rate limiting to protect downstream servic

    TypeScriptbackground-jobselixirnodejs
    在 GitHub 上查看↗8,432
  • jeffail/tunnyJeffail 的头像

    Jeffail/tunny

    4,033在 GitHub 上查看↗

    Tunny is a worker pool library and concurrency manager for Go. It functions as a concurrent task scheduler that limits the number of parallel workers processing jobs to prevent system resource exhaustion. The project enables the maintenance of persistent state within individual worker routines to avoid repeated initialization costs. It also supports dynamic worker scaling, allowing the number of active background workers to be adjusted in real time without interrupting tasks in progress. The library provides mechanisms for task timeout enforcement and worker lifecycle management, including t

    Gogogolanggoroutine-pool
    在 GitHub 上查看↗4,033
  • ruby-concurrency/concurrent-rubyruby-concurrency 的头像

    ruby-concurrency/concurrent-ruby

    5,830在 GitHub 上查看↗

    Concurrent Ruby is a comprehensive concurrency toolkit for the Ruby language that provides thread-safe data structures, synchronization primitives, and asynchronous execution patterns. It implements core concurrency abstractions including an actor model framework where isolated actors communicate through asynchronous message passing, a future and promise system for composing non-blocking operations, and thread pool executors that manage reusable worker threads for concurrent task execution. The library distinguishes itself through a broad set of coordination mechanisms that go beyond basic th

    Ruby
    在 GitHub 上查看↗5,830
  • 查看 P Queue 的所有 30 个替代方案→