Click or drag to resize

ScriptingWithTimeout Method

Adds a timeout expiration to a given awaitable task.

Namespace:  RRAutoLib.Scripting
Assembly:  RRAutoLib (in RRAutoLib.dll) Version: 4.0.8678.28884
Syntax
Public Shared Function WithTimeout ( 
	objTask As Task,
	intTimeout As UInteger,
	Optional sctCancelToken As CancellationToken = Nothing
) As Task(Of Boolean)

Parameters

objTask
Type: System.Threading.TasksTask
The task being given a timeout expiration.
intTimeout
Type: SystemUInt32
Time in milliseconds to await the task before giving up.
sctCancelToken (Optional)
Type: System.ThreadingCancellationToken
Token provided by a controlling source to notify this method that it should cancel its execution.

Return Value

Type: TaskBoolean
A TaskTResult that must be awaited, for the timeout. Returns True if the given task completed before the timeout expiration, or False if the task timed out.
Remarks
This method was designed specifically for use within the scripting context.
See Also