TaskUtilities..::..AutoCancelingTask<(Of <(<'T>)>)> Method (Int32)

Creates a task that automatically cancels after a given delay.

Namespace:  Tortuga.Anchor
Assembly:  Tortuga.Anchor (in Tortuga.Anchor.dll)

Syntax


public static Task<T> AutoCancelingTask<T>(
	int delay
)
Public Shared Function AutoCancelingTask(Of T) ( _
	delay As Integer _
) As Task(Of T)

Type Parameters

T
Task type

Parameters

delay
Type: Int32
The delay, in milliseconds, before the task is canceled.

Return Value

Task that will be canceled.

Remarks


Use Task.Delay if a result isn't needed.