HelpAsync class
Asynchronous Programming
Completion of other work while waiting for a complex operation to finish. The complex operation is usually set to be the asynchronous function.
Terminology
- Synchronous operation: Blocks other operations from executing till it completes
- Synchronous function: Only syncOp
- Asynchronous operation: Allows other operations to execute before it completes
- Asynchronous function: >=1 asyncOp
futures
future
: instance of Future class- Represents result of asyncOp:
- Uncompleted, waiting for asyncOp to finish or throw an error
- Completed, returns value for successful asyncOp, or throw error
- Represents result of asyncOp:
-
Future<ReturnValueType>
: class returning future value of ReturnValueType
async
await
Generators (*)
- Function which returns multiple values
- e.g., sync function returns
int
, async function returnsFuture<int>
, sync generator returnsIterable<int>
, async generator returnsStream<int>
- Uses
yield
instead ofreturn
Constructors
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
-
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