Coder Social home page Coder Social logo

leafpetersen / async Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dart-lang/async

1.0 2.0 1.0 220 KB

A Dart package that contains tools to work with asynchronous computations.

Home Page: https://pub.dartlang.org/packages/async

License: BSD 3-Clause "New" or "Revised" License

Dart 100.00%

async's Introduction

Contains utility classes in the style of dart:async to work with asynchronous computations.

  • The AsyncCache class allows expensive asynchronous computations values to be cached for a period of time.

  • The AsyncMemoizer class makes it easy to only run an asynchronous operation once on demand.

  • The CancelableOperation class defines an operation that can be canceled by its consumer. The producer can then listen for this cancellation and stop producing the future when it's received. It can be created using a CancelableCompleter.

  • The delegating wrapper classes allow users to easily add functionality on top of existing instances of core types from dart:async. These include DelegatingFuture, DelegatingStream, DelegatingStreamSubscription, DelegatingStreamConsumer, DelegatingSink, DelegatingEventSink, and DelegatingStreamSink.

    The delegating classes all have .typed() constructors which allow users to cast the generic type parameters in a way that's safe for strong mode. For example, if future is a Future<dynamic> and you know it actually contains an int, you can write DelegatingFuture.typed<int>(future).

  • The FutureGroup class makes it easy to wait until a group of features that may change over time completes.

  • The LazyStream class allows a stream to be initialized lazily when .listen() is first called.

  • The NullStreamSink class is an implementation of StreamSink that discards all events.

  • The RestartableTimer class extends Timer with a reset() method.

  • The Result class that can hold either a value or an error. It provides various utilities for converting to and from Futures and Streams.

  • The StreamGroup class merges a collection of streams into a single output stream.

  • The StreamQueue class allows a stream to be consumed event-by-event rather than being pushed whichever events as soon as they arrive.

  • The StreamSplitter class allows a stream to be duplicated into multiple identical streams.

  • The StreamZip class combines multiple streams into a single stream of lists of events.

  • This package contains a number of StreamTransformers. SingleSubscriptionTransformer converts a broadcast stream to a single-subscription stream, and typedStreamTransformer casts the type of a Stream. It also defines a transformer type for StreamSinks, StreamSinkTransformer.

  • The SubscriptionStream class wraps a StreamSubscription so it can be re-used as a Stream.

async's People

Contributors

floitschg avatar keertip avatar kevmoo avatar lrhn avatar matanlurey avatar natebosch avatar nex3 avatar sethladd avatar sgjesse avatar srawlins avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

muskanmahajan37

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.