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

API Browser

Static class

Task

static class Task

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

Creates completed tasks or submits work with runtime-selected execution (development).

Remarks

Run currently starts bounded native-thread work in the calling invocation. Captured objects retain identity. Importing System.Concurrency.Tasks.* supports Task.Run alongside Task<T> without an alias. Inline block callbacks infer value results, and direct unit await is supported; generic async callers still require unsupported constructed application state-machine import (see the callback guide). Work uses the default dispatcher; arbitrary shared read-modify-write operations are not atomic. Invocation limits and cancellation apply. A callback Fault terminates the invocation, not a task error case.

Properties

1 item
Static member: CompletedTask: Task<void> Returns an already successfully completed unit task. Each access uses the current dispatcher; task identity is not guaranteed.

Methods

4 items
Static member: FromResult<T>(value: T) -> Task<T> Returns an already successfully completed task containing value. Awaiting the task needs no scheduled work. Explicit completion callbacks retain normal deferred dispatch through th…
Static member: Run(callback: () -> ()) -> Task<void> No summary available.
Static member: Run<T>(callback: () -> T) -> Task<T> No summary available.
Static member: Run<T>(callback: () -> Task<T>) -> Task<T> No summary available.