Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Control.Async<'T> Type (F#)

A compositional asynchronous computation, which, when run, will eventually produce a value of type 'T, or else raises an exception. The functions for working with these objects are in the Async class.

Namespace/Module Path: Microsoft.FSharp.Control

Assembly: FSharp.Core (in FSharp.Core.dll)

[<Sealed>]
[<NoEquality>]
[<NoComparison>]
type Async<'T> =
 class
 end

Asynchronous computations are normally specified using an F# computation expression. When run, asynchronous computations have two modes: as a work item (executing synchronous code), or as a wait item (waiting for an event or I/O completion). When run, asynchronous computations can be governed by CancellationToken. This can usually be specified when the asynchronous computation is started. The associated CancellationTokenSource may be used to cancel the asynchronous computation. Asynchronous computations built using computation expressions can check the cancellation condition regularly. Synchronous computations within an asynchronous computation do not automatically check this condition. For more information, see Asynchronous Workflows (F#).

This type is named FSharpAsync in compiled assemblies. If you are accessing the type from a language other than F#, or through reflection, use this name.

Windows 8, Windows 7, Windows Server 2012, Windows Server 2008 R2

F# Core Library Versions

Supported in: 2.0, 4.0, Portable

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.