async library
Curated asynchronous and reactive toolkit for Daxle.
Exports:
- Concurrency: Fine-grained worker limits (
sequential,unbounded,bounded(limit)), Concurrency.dispatch, Concurrency.process, and Concurrency.createPool. - Pool, PoolResource: Robust asynchronous resource pooling from
package:pool. - Stream Transformation Utilities: Reactive stream operators from
package:stream_transform(debounce,throttle,audit,buffer,combineLatest,merge,switchMap,scan,tap,whereType). - Async Utilities: Primitives from
package:async(FutureGroup, AsyncCache, AsyncMemoizer, StreamZip, StreamQueue, StreamGroup, StreamSplitter).
Classes
-
AsyncCache<
T> - Runs asynchronous functions and caches the result for a period of time.
-
AsyncMemoizer<
T> - A class for running an asynchronous function exactly once and caching its result.
-
FutureGroup<
T> - A collection of futures waits until all added Futures complete.
- Pool
- Manages an abstract pool of resources with a limit on how many may be in use at once.
- PoolResource
- A member of a Pool.
-
StreamGroup<
T> - A collection of streams whose events are unified and sent through a central stream.
-
StreamQueue<
T> - An asynchronous pull-based interface for accessing stream events.
-
StreamSplitter<
T> - A class that splits a single source stream into an arbitrary number of (single-subscription) streams (called "branch") that emit the same events.
-
StreamZip<
T> - A stream that combines the values of other streams.
Extension Types
- Concurrency
- Defines the concurrency execution strategy for asynchronous tasks.
Extensions
-
AsyncExpand
on Stream<
T> - Alternatives to asyncExpand.
-
AsyncMap
on Stream<
T> - Alternatives to asyncMap.
-
CombineLatest
on Stream<
T> - Utilities to combine events from multiple streams through a callback or into a list.
-
Concatenate
on Stream<
T> - Utilities to append or prepend to a stream.
-
Merge
on Stream<
T> - Utilities to interleave events from multiple streams.
-
RateLimit
on Stream<
T> - Utilities to rate limit events.
-
Scan
on Stream<
T> - A utility similar to fold which emits intermediate accumulations.
-
Switch
on Stream<
T> - A utility to take events from the most recent sub stream returned by a callback.
-
SwitchLatest
on Stream<
Stream< T> > - A utility to take events from the most recent sub stream.
-
TakeUntil
on Stream<
T> - A utility to end a stream based on an external trigger.
-
Tap
on Stream<
T> - A utility to chain extra behavior on a stream.
-
Where
on Stream<
T> - Utilities to filter events.
-
WhereNotNull
on Stream<
T?>