Skip to content
pubscout

concurrent_queue

1.6.0, released a year ago by an unverified publisher

Priority queue with concurrency control for async and sync operations.

WASM-ready
$ flutter pub add concurrent_queue
Source repository

What it does

Provides a concurrency-controlled priority queue for Dart and Flutter. It is useful for rate-limiting asynchronous tasks such as REST API calls or heavy CPU/memory operations.

AI-written summary of version 1.6.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to rate-limit or throttle concurrent API requests.
  • You want to manage a queue of tasks with concurrency limits.

Skip it when

  • You do not need concurrency control or prioritization for your tasks.

Strengths

  • Simple API similar to Sindre Sorhus's p-queue
  • Supports concurrency limits and idle state monitoring

Weaknesses

  • Limited documentation beyond basic and advanced examples

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:concurrent_queue/concurrent_queue.dart';

final queue = ConcurrentQueue(
  concurrency: 2
);

queue.add(() async {
  await Future.delayed(Duration(seconds: 5));
  print('Done waiting for 5 seconds');
});

Alternatives

Packages that do the same job and could replace concurrent_queue.

  • async

    Provides core Dart asynchronous tools and primitives like queues and pools if you prefer standard library utilities.

Works with

Packages commonly used together with concurrent_queue: ones it builds on, ones built on it, and its own family.