Sequential<R> class

Creates a sequential execution wrapper for async functions to prevent race conditions.

Ensures that concurrent calls to the wrapped function are executed one at a time in the order they were received, while preserving the correct return values.

This is useful for operations that must be performed sequentially, such as file writes or database updates that could cause conflicts if executed concurrently.

Constructors

Sequential(Future<R> _fn(List args))

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

call(List args) Future<R>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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