sync 0.2.0

  • Readme
  • Changelog
  • Installing
  • 70

sync #

A library for managing asynchronous processes inspired by the Go sync package.

Features #

  • Mutex & ReadWriteMutex
  • Semaphore
  • WaitGroup

License #

Unless otherwise mentioned at the top of a file, all code is licensed under the MIT license as found in the LICENSE file.

Changelog #

0.1.0 #

  • Initial version.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  sync: ^0.2.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:sync/sync.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
53
Health:
Code health derived from static analysis. [more]
93
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
78
Overall:
Weighted score of the above. [more]
70
Learn more about scoring.

We analyzed this package on Nov 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.6.0
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:sync/sync.dart.

Health suggestions

Fix lib/semaphore.dart. (-2.96 points)

Analysis of lib/semaphore.dart reported 6 hints, including:

line 11 col 33: Unnecessary new keyword.

line 15 col 13: Unnecessary new keyword.

line 18 col 13: Unnecessary new keyword.

line 25 col 21: Unnecessary new keyword.

line 38 col 13: Unnecessary new keyword.

Fix lib/read_write_mutex.dart. (-1.99 points)

Analysis of lib/read_write_mutex.dart reported 4 hints:

line 17 col 31: Unnecessary new keyword.

line 60 col 7: Unnecessary new keyword.

line 94 col 13: Unnecessary new keyword.

line 114 col 18: Unnecessary new keyword.

Fix lib/waitgroup.dart. (-1.49 points)

Analysis of lib/waitgroup.dart reported 3 hints:

line 21 col 13: Unnecessary new keyword.

line 35 col 14: Unnecessary new keyword.

line 38 col 20: Unnecessary new keyword.

Fix lib/mutex.dart. (-0.50 points)

Analysis of lib/mutex.dart reported 1 hint:

line 26 col 35: Unnecessary new keyword.

Maintenance suggestions

Package is getting outdated. (-11.78 points)

The package was last published 58 weeks ago.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and sync.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.0.0 <3.0.0
Dev dependencies
test >=0.12.0 <2.0.0