ParallelOpt4<A extends Object, B extends Object, C extends Object, D extends Object> class final

Runs four AsyncOpt recipes concurrently and combines their results into a typed record.

On run, all recipes start together. If all produce Val, the result is Val<(A, B, C, D)>. If any recipe produces Nil, the result is Nil.

No work happens until run is called. Each call to run re-executes all recipes — there is no hidden caching.

Exceptions thrown by recipes propagate; this class does not catch, retry, or convert thrown errors.

Annotations
  • @experimental

Constructors

ParallelOpt4(AsyncOpt<A> a, AsyncOpt<B> b, AsyncOpt<C> c, AsyncOpt<D> d)
Creates a parallel combinator for four AsyncOpt recipes.
const

Properties

a AsyncOpt<A>
The first recipe.
final
b AsyncOpt<B>
The second recipe.
final
c AsyncOpt<C>
The third recipe.
final
d AsyncOpt<D>
The fourth recipe.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run() OptionAsync<(A, B, C, D)>
Runs all recipes concurrently and combines results into a typed record.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited