Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Method

FromResult

static func FromResult<T>(value: T) -> Task<T>

Declaring type: Task
Module: System.Concurrency.Tasks
Assembly: System.Runtime.dll
Source file: Tasks.rvn

Returns an already successfully completed task containing value. Awaiting the task needs no scheduled work. Explicit completion callbacks retain normal deferred dispatch through the current task queue.

Parameters

Name Type Description
value T

Return value

Task<T>