Click or drag to resize
WaitHandleExtensionsAsTask Method (WaitHandle, TimeSpan)
Convert a wait handle to a task

Namespace: Griffin
Assembly: Griffin.Core (in Griffin.Core.dll) Version: 1.0.39.0 (1.0.39.0)
Syntax
public static Task AsTask(
	this WaitHandle handle,
	TimeSpan timeout
)

Parameters

handle
Type: System.ThreadingWaitHandle
Wait handle
timeout
Type: SystemTimeSpan
Max time to wait

Return Value

Type: Task
Created task.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type WaitHandle. 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