Skip to content
pubscout

computer

3.2.1, released 5 years ago by an unverified publisher

Easy to use pool of concurrent workers with a compute-like API.

$ flutter pub add computer
Source repository

What it does

Computer is a lightweight library for concurrent computations using isolates. It manages a pool of workers initialized on start to execute tasks without the overhead of creating and releasing isolates for each task.

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

Use it when

  • You need to run heavy computations concurrently without blocking the main UI thread
  • You want a worker pool with a strictly defined number of workers

Skip it when

  • You only need simple single-fire background tasks where Flutter's built-in compute() is sufficient

Strengths

  • No overhead on creating and releasing isolates for each task
  • Provides a simple compute-like API
  • Supports both singleton and multiple instance creation

Weaknesses

  • Callbacks must be top-level or static methods of a class

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

Not documented

final computer = Computer.create();
await computer.turnOn(
  workersCount: 4,
  verbose: false,
);
final result = await computer.compute(
  fib,
  param: 45,
);
await computer.turnOff();

Alternatives

Packages that do the same job and could replace computer.

  • pool

    Manage a finite pool of resources to control concurrent operations.

  • squadron

    Multithreading and worker thread pools for Dart and Flutter using Isolates and Web Workers.

  • isolate_manager

    Manage long-lived isolates across native, Web, and WASM platforms with built-in queuing and workers.

  • isolate_pool_executor

    Manages a pool of Dart isolates to run CPU‑intensive tasks without blocking the main isolate.

Works with

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