C-DEngine 5.105

TheCommonUtils..::..TaskWaitTimeout Method (Task, TimeSpan, Nullable<(Of <(<'CancellationToken>)>)>)

Returns a task that completes when the task completes or a timeout occurrs.

Namespace:  nsCDEngine.BaseClasses
Assembly:  C-DEngine (in C-DEngine.dll)

Syntax


public static Task TaskWaitTimeout(
	Task task,
	TimeSpan timeout,
	Nullable<CancellationToken> cancelToken
)
Public Shared Function TaskWaitTimeout ( _
	task As Task, _
	timeout As TimeSpan, _
	cancelToken As Nullable(Of CancellationToken) _
) As Task
public:
static Task^ TaskWaitTimeout(
	Task^ task, 
	TimeSpan^ timeout, 
	Nullable<CancellationToken^> cancelToken
)

Parameters

task
Type: Task
Task to be timed out.
timeout
Type: TimeSpan
Timeout interval.
cancelToken
Type: Nullable<(Of <(<'CancellationToken>)>)>
Cancel token for the task

Return Value

The completed task.