ValueTask<T> class abstract

Class representing a Task returning a single value.

Inheritance

Constructors

ValueTask()

Properties

hashCode int
The hash code for this object.
no setterinherited
isCancelled bool
Flag indicating whether the task has been cancelled.
no setterinherited
isFinished bool
Flag indicating whether the task has completed.
no setterinherited
isRunning bool
Flag indicating whether the task is actually being executed.
no setterinherited
runningTime Duration
Duration between the moment the task was assigned to a Worker, and the moment it finished executing.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value Future<T>
The task's value provided as a Future.
no setter
waitTime Duration
Duration between the moment the task was posted, and the moment it was assigned to a Worker.
no setterinherited

Methods

cancel([String? message]) → void
Cancels the task. If the task is still pending, cancellation is effective immediately with a CancelledException. For a running ValueTask, cancellation is ignored and the task's ValueTask.value will eventually complete. For a running StreamTask, cancellation will be effective after receiving the next value and the task's StreamTask.stream will be closed. It should be noted that cancellation of running tasks will not be notified to platform workers. To give running tasks a chance to get notified of cancellation, a CancellationToken should be passed on to tasks at the time they are created.
inherited
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