Click or drag to resize
TaskHelperTimeoutAsync Method
Completes either when task completes or when timeoutMilliseconds have elapsed, whichever comes first.

Namespace: Lawo.Threading.Tasks
Assembly: Lawo (in Lawo.dll) Version: 1.4.1707.27006
Syntax
C#
public static Task<bool> TimeoutAsync(
	this Task task,
	int timeoutMilliseconds
)

Parameters

task
Type: System.Threading.TasksTask
The task to wait for.
timeoutMilliseconds
Type: SystemInt32
The maximum number of milliseconds to wait.

Return Value

Type: TaskBoolean
true if the task did not complete within timeoutMilliseconds; otherwise, false,

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Task. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also