Last updated:
0 purchases
parallelism
Parallelism: Concurrency made simple #
(⚠️ Most of the relevant documentation is built into the source code, generate docs with dartdoc for
comprehensive documentation.)
While concurrency is comparatively less hairy in dart/flutter, writing code to leverage concurrency
is still not as simple as it could be. This package aims to change that.
Primary Features #
Setting up long-running Isolates with all of four Send/Receive Ports is a pain. We get that
'Handshake' done for you.
Similarly, the data returned by the Isolate being typed as dynamic is also annoying, we go ahead
and deal with that too. So, now you don't have to deal with finicky type-casting inputs across
your background tasks.
Code Conventions #
Library level design & developers documentation—an explanation of why things ended up the way they
are. Code conventions and comparative outlines of feature sets and other technical details are
added here too. Design considerations first and developer considerations next.
Documentation for all public interfaces. Use this format:
One line description of what the method/class/thing does
### Args <!-- Add this sections if any of the argument names are open to interpretation -->
- `argName`: Description of what this argument is.
### Exceptions <!-- Add this section if there are uncaught Exceptions/Errors -->
- `ExceptionName`: Cause(s) for this exception.
### Note <!-- Add this section where you want to highlight something specific -->
- Bullet point everything except the one line description.
- You can highlight anything from the a quirk of the internal logic of this function to a random
fact related to this function
copied to clipboard
Use descriptive variable names.
Don't ignore return values even if you are not using them, use dummy variables (_, __,
basically any number of underscores) to handle them
Keep file sizes small. Break up large 'design chunks' (eg. color) into smaller
mini-libraries
(eg. color utils, color palette generation, color theme generation). Mark the mini-libraries
/// {@nodoc} (case sensitive).
Mini-libraries are to be collected into a single library (eg. color.dart) using the
export/show directives.
External Resources #
Is Dart multi-threaded?, Martin Fink
How Isolates Work, Dart Developer Documentation
Dart Isolates: What, Why, and How!, Hardik Mehta
MultiThreading is Flutter, Mohit Joshi
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.