dyno 0.0.1 copy "dyno: ^0.0.1" to clipboard
dyno: ^0.0.1 copied to clipboard

outdated

An isolation pool with load balancer for Flutter. Creates and kills isolates as needed.

Dyno #

pub package GitHub issues Maintenance

Creates an isolation pool and manages it dynamically to run a closure isolated.

Tip: running heavy computations isolated prevents lags in application. An isolate has it's own memory and event loop.

Features #

➡️ It doesn't create isolates for every process, communicates bidirectionally with isolations.

➡️ Has a load balancer, creates and kills isolates automatically according to load.

➡️ Lightweight, only 182 lines.

Getting started #

Add dependency to pubspec.yaml:

dyno: ^0.0.1

Usage #

  • Import dyno,
import 'package:dyno/dyno.dart' as dyno;
  • prepare isolates before use. (This an optional step)

Dyno creates isolates as needed, but preparing speeds up first run. You can prepare dyno on the splash screen or any other desired place.

dyno.prepare(single: false);

prepare creates two isolate by default, but creates one isolate when single parameter is set to true.

  • Run a closure isolated,
final result = await dyno.run<String>(() {
    // Some complex process.
    return 'result of process';
});

Maintainer #

Hey, I'm Ertuğrul, please feel free to ask any questions about this tool. If you find Dyno useful, you can hit the like button and give a star to project on Github to motivate me or treat me with coffee.

6
likes
0
pub points
24%
popularity

Publisher

verified publishersourcekod.com

An isolation pool with load balancer for Flutter. Creates and kills isolates as needed.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on dyno