Logo FSharp.Core

BackgroundTaskBuilder Type

Contains methods to build tasks using the F# computation expression syntax

Instance members

Instance member Description

this.Run

Full Usage: this.Run

Parameters:
Returns: Task<'T>
Modifiers: inline
Type parameters: 'T

Hosts the task code in a state machine and starts the task, executing in the threadpool using Task.Run

code : TaskCode<'T, 'T>
Returns: Task<'T>

Static members

Static member Description

BackgroundTaskBuilder.RunDynamic(code)

Full Usage: BackgroundTaskBuilder.RunDynamic(code)

Parameters:
Returns: Task<'T>
Type parameters: 'T

The entry point for the dynamic implementation of the corresponding operation. Do not use directly, only used when executing quotations that involve tasks or other reflective execution of F# code.

code : TaskCode<'T, 'T>
Returns: Task<'T>

Inherited members

Inherited from TaskBuilderBase

Instance members

Instance member Description

this.Combine

Full Usage: this.Combine

Parameters:
Returns: TaskCode<'TOverall, 'T>
Modifiers: inline
Type parameters: 'TOverall, 'T

Specifies the sequential composition of two units of task code.

task1 : TaskCode<'TOverall, unit>
task2 : TaskCode<'TOverall, 'T>
Returns: TaskCode<'TOverall, 'T>

this.Delay

Full Usage: this.Delay

Parameters:
Returns: TaskCode<'TOverall, 'T>
Modifiers: inline
Type parameters: 'TOverall, 'T

Specifies the delayed execution of a unit of task code.

generator : unit -> TaskCode<'TOverall, 'T>
Returns: TaskCode<'TOverall, 'T>

this.For

Full Usage: this.For

Parameters:
Returns: TaskCode<'TOverall, unit>
Modifiers: inline
Type parameters: 'T, 'TOverall

Specifies the iterative execution of a unit of task code.

sequence : 'T seq
body : 'T -> TaskCode<'TOverall, unit>
Returns: TaskCode<'TOverall, unit>

this.Return

Full Usage: this.Return

Parameters:
    value : 'T

Returns: TaskCode<'T, 'T>
Modifiers: inline
Type parameters: 'T

Specifies a unit of task code which returns a value

value : 'T
Returns: TaskCode<'T, 'T>

this.TryFinally

Full Usage: this.TryFinally

Parameters:
Returns: TaskCode<'TOverall, 'T>
Modifiers: inline
Type parameters: 'TOverall, 'T

Specifies a unit of task code which executed using try/finally semantics

body : TaskCode<'TOverall, 'T>
compensation : unit -> unit
Returns: TaskCode<'TOverall, 'T>

this.TryWith

Full Usage: this.TryWith

Parameters:
Returns: TaskCode<'TOverall, 'T>
Modifiers: inline
Type parameters: 'TOverall, 'T

Specifies a unit of task code which executed using try/with semantics

body : TaskCode<'TOverall, 'T>
catch : exn -> TaskCode<'TOverall, 'T>
Returns: TaskCode<'TOverall, 'T>

this.Using

Full Usage: this.Using

Parameters:
    resource : 'Resource
    body : 'Resource -> TaskCode<'TOverall, 'T>

Returns: TaskCode<'TOverall, 'T>
Modifiers: inline
Type parameters: 'Resource, 'TOverall, 'T (requires :> System.IAsyncDisposable)

Specifies a unit of task code which binds to the resource implementing IAsyncDisposable and disposes it asynchronously

resource : 'Resource
body : 'Resource -> TaskCode<'TOverall, 'T>
Returns: TaskCode<'TOverall, 'T>

this.While

Full Usage: this.While

Parameters:
Returns: TaskCode<'TOverall, unit>
Modifiers: inline
Type parameters: 'TOverall

Specifies the iterative execution of a unit of task code.

condition : unit -> bool
body : TaskCode<'TOverall, unit>
Returns: TaskCode<'TOverall, unit>

this.Zero

Full Usage: this.Zero

Returns: TaskCode<'TOverall, unit>
Modifiers: inline
Type parameters: 'TOverall

Specifies a unit of task code which produces no result

Returns: TaskCode<'TOverall, unit>

Type something to start searching.