Header menu logo FSharp.Core

AsyncPrimitives Module

Entry points for generated code

Functions and values

Function or value Description

Bind ctxt part1 part2

Full Usage: Bind ctxt part1 part2

Parameters:
    ctxt : AsyncActivation<'T> - The async activation.
    part1 : Async<'U> - The first part of the computation.
    part2 : 'U -> Async<'T> - A function returning the second part of the computation.

Returns: AsyncReturn An async activation suitable for running part1 of the asynchronous execution.

The F# compiler emits calls to this function to implement the let! construct for F# async expressions.

ctxt : AsyncActivation<'T>

The async activation.

part1 : Async<'U>

The first part of the computation.

part2 : 'U -> Async<'T>

A function returning the second part of the computation.

Returns: AsyncReturn

An async activation suitable for running part1 of the asynchronous execution.

CallThenInvoke ctxt result1 part2

Full Usage: CallThenInvoke ctxt result1 part2

Parameters:
    ctxt : AsyncActivation<'T> - The async activation.
    result1 : 'U - The result of the first part of the computation.
    part2 : 'U -> Async<'T> - A function returning the second part of the computation.

Returns: AsyncReturn A value indicating asynchronous execution.

The F# compiler emits calls to this function to implement constructs for F# async expressions.

ctxt : AsyncActivation<'T>

The async activation.

result1 : 'U

The result of the first part of the computation.

part2 : 'U -> Async<'T>

A function returning the second part of the computation.

Returns: AsyncReturn

A value indicating asynchronous execution.

Invoke computation ctxt

Full Usage: Invoke computation ctxt

Parameters:
    computation : Async<'T> - The async computation.
    ctxt : AsyncActivation<'T> - The async activation.

Returns: AsyncReturn A value indicating asynchronous execution.

The F# compiler emits calls to this function to implement constructs for F# async expressions.

computation : Async<'T>

The async computation.

ctxt : AsyncActivation<'T>

The async activation.

Returns: AsyncReturn

A value indicating asynchronous execution.

MakeAsync body

Full Usage: MakeAsync body

Parameters:
Returns: Async<'T> The async computation.

The F# compiler emits calls to this function to implement F# async expressions.

body : AsyncActivation<'T> -> AsyncReturn

The body of the async computation.

Returns: Async<'T>

The async computation.

TryFinally ctxt computation finallyFunction

Full Usage: TryFinally ctxt computation finallyFunction

Parameters:
    ctxt : AsyncActivation<'T> - The async activation.
    computation : Async<'T> - The computation to protect.
    finallyFunction : unit -> unit - The finally code.

Returns: AsyncReturn A value indicating asynchronous execution.

The F# compiler emits calls to this function to implement the try/finally construct for F# async expressions.

ctxt : AsyncActivation<'T>

The async activation.

computation : Async<'T>

The computation to protect.

finallyFunction : unit -> unit

The finally code.

Returns: AsyncReturn

A value indicating asynchronous execution.

TryWith ctxt computation catchFunction

Full Usage: TryWith ctxt computation catchFunction

Parameters:
Returns: AsyncReturn A value indicating asynchronous execution.

The F# compiler emits calls to this function to implement the try/with construct for F# async expressions.

ctxt : AsyncActivation<'T>

The async activation.

computation : Async<'T>

The computation to protect.

catchFunction : Exception -> Async<'T> option

The exception filter.

Returns: AsyncReturn

A value indicating asynchronous execution.

Type something to start searching.