Threading.CancellationTokenSource Class (F#)

Signals to a CancellationToken that it should be cancelled.

Namespace/Module Path: System.Threading

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

[<Sealed>]
[<AllowNullLiteral>]
type CancellationTokenSource =
 class
  interface IDisposable
  new CancellationTokenSource : unit -> CancellationTokenSource
  member this.Cancel : unit -> unit
  static member CreateLinkedTokenSource : CancellationToken * CancellationToken -> CancellationTokenSource
  member this.Dispose : unit -> unit
  member this.Token :  CancellationToken
 end

Remarks

This type is provided for use only with the F# Core Library Versions that targets .NET Framework 2.0. If you are using .NET Framework 4, use the .NET Framework 4 type with the same name, CancellationTokenSource.

Constructors

Member

Description

new

Creates a new cancellation capability.

Instance Members

Member

Description

Cancel

Cancels the operation.

Dispose

Discards resources associated with this capability.

Token

Fetches the token representing the capability to detect cancellation of an operation.

Static Members

Member

Description

CreateLinkedTokenSource

Creates a cancellation capability linking two tokens.

Platforms

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

Version Information

F# Core Library Versions

Supported in: 2.0

See Also

Reference

System.Threading Namespace (F#)