Header menu logo FSharp.Core

TaskBuilder Module

Contains the `task` computation expression builder.

Functions and values

Function or value Description

backgroundTask

Full Usage: backgroundTask

Returns: BackgroundTaskBuilder

Builds a task using computation expression syntax which switches to execute on a background thread if not already doing so.

If the task is created on a foreground thread (where SynchronizationContext.Current is non-null) its body is executed on a background thread using Task.Run. If created on a background thread (where SynchronizationContext.Current is null) it is executed immediately on that thread.

Returns: BackgroundTaskBuilder

task

Full Usage: task

Returns: TaskBuilder

Builds a task using computation expression syntax.

Returns: TaskBuilder

Type something to start searching.