Synchronously forward chained cancellations (#239) Add a test which chains through multiple `.then` calls and then cancels the original operation. This test passes with the original code, but starts failing after fixing a bug in `Completer.complete` in the SDK. https://dart-review.googlesource.com/c/sdk/+/258929 - Add a list of extra completers to forward cancellation. In places where the cancellation had been forwarded through a `whenComplete`, add to the list of extra cancellations instead. This allows the Future return by the outer cancellation to wait for the other callbacks to complete before firing. - When setting up forwarding on an already canceled completer, immediately forward the cancellation. - When forwarding cancellations, don't repeatedly call `_cancel()` on a completer which has already been canceled. - In `race()`, disable cancellation propagation to prevent a cyclic cancellation.
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 FutureGroup class makes it easy to wait until a group of futures 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.
For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.