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: (
public static Task AsTask(
	this WaitHandle handle,
	TimeSpan timeout


Type: System.ThreadingWaitHandle
Wait handle
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