WaitForFuture class final
Waits for a real Future - an asset load, a network reply.
The future completes whenever it likes, on a microtask; what this does is record that and report it on the next fixed step, so the coroutine still resumes inside the tick window. The one-step latency is the price of that and is not worth removing.
An error on the future is rethrown into the coroutine's own completion, so
an asset that fails to load surfaces at the await on the handle rather
than hanging it forever.
- Implemented types
Constructors
-
WaitForFuture(Future<
void> future)
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
-
advance(
double seconds) → bool -
Called once per fixed step with the simulated time that passed. Returns
true when the wait is over; the coroutine resumes on that same step.
override
-
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