-
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Squadron Multithreading and worker pools in Dart. Offload CPU-bound and long running tasks and give your mobile and Web apps some air! |
Squadron is a multithreading library, providing cross-platform workers and worker pools to offload CPU-bound or long running tasks in Dart and Flutter.
Squadron takes care of all plumbing aspects to have your code run in platform threads (Isolates or Web Workers) while keeping it callable from your main app code seamlessly. Developers simply focus on implementing the services that will run in separate threads, and on wrapping those services in Squadron Workers.
Even better, Squadron comes with annotations leveraged by companion package squadron_builder to automatically generate the boilerplate code necessary to initialize and wrap custom services into workers and worker pools!
Typical use-cases:
-
fight UI jank: execute code that creates UI jank in a single Worker -- it will not run faster, but will help keep the app responsive to user actions.
-
parallelize computations: execute parallelizable algorithms by distributing workloads to a set of Workers or to a WorkerPool and get results quicker.