非同步
一個包含用於處理非同步計算工具的 Dart 套件。
- 星標
- 314
- 分支
- 51
- 最近推送(UTC)
- 2024年10月17日
- 專案狀態
- 已封存
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
[!IMPORTANT]
This repo has moved to https://github.com/dart-lang/core/tree/main/pkgs/async
Contains utility classes in the style of dart:async to work with asynchronous
computations.
Package API
-
The
AsyncCacheclass allows expensive asynchronous computations values to be cached for a period of time. -
The
AsyncMemoizerclass makes it easy to only run an asynchronous operation once on demand. -
The
CancelableOperationclass 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 aCancelableCompleter. -
The delegating wrapper classes allow users to easily add functionality on top of existing instances of core types from
dart:async. These includeDelegatingFuture,DelegatingStream,DelegatingStreamSubscription,DelegatingStreamConsumer,DelegatingSink,DelegatingEventSink, andDelegatingStreamSink. -
The
FutureGroupclass makes it easy to wait until a group of futures that may change over time completes. -
The
LazyStreamclass allows a stream to be initialized lazily when.listen()is first called. -
The
NullStreamSinkclass is an implementation ofStreamSinkthat discards all events. -
The
RestartableTimerclass extendsTimerwith areset()method. -
The
Resultclass that can hold either a value or an error. It provides various utilities for converting to and fromFutures andStreams. -
The
StreamGroupclass merges a collection of streams into a single output stream. -
The
StreamQueueclass allows a stream to be consumed event-by-event rather than being pushed whichever events as soon as they arrive. -
The
StreamSplitterclass allows a stream to be duplicated into multiple identical streams. -
The
StreamZipclass combines multiple streams into a single stream of lists of events. -
This package contains a number of
StreamTransformers.SingleSubscriptionTransformerconverts a broadcast stream to a single-subscription stream, andtypedStreamTransformercasts the type of aStream. It also defines a transformer type forStreamSinks,StreamSinkTransformer. -
The
SubscriptionStreamclass wraps aStreamSubscriptionso it can be re-used as aStream.
Publishing automation
For information about our publishing automation and release process, see https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.
分類
使用的依賴
依賴清單 6 項
- collection
^1.15.0 - meta
^1.3.0 - dart_flutter_team_lints開發依賴
^3.0.0 - fake_async開發依賴
^1.2.0 - stack_trace開發依賴
^1.10.0 - test開發依賴
^1.16.6
如何選擇適合專案的儲存庫?
先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。
- 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
- 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
- 使用前在 GitHub 確認 README、授權條款與 Issues。
來源與維護
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗