C# 클래스 Corlib.Threading.Tasks.WaitHandleExtensions

파일 보기 프로젝트 열기: GeorgeTsiokos/corlib

공개 메소드들

메소드 설명
ToTask ( this waitHandle, System.TimeSpan timeout = null, AsyncCallback asyncCallback = null, object state = null ) : IDisposable

Converts a WaitHandle into a disposable Task

Calling dispose on the task before it completes will result in an exception

메소드 상세

ToTask() 공개 정적인 메소드

Converts a WaitHandle into a disposable Task
Calling dispose on the task before it completes will result in an exception
public static ToTask ( this waitHandle, System.TimeSpan timeout = null, AsyncCallback asyncCallback = null, object state = null ) : IDisposable
waitHandle this the operating-system specfic object to watch
timeout System.TimeSpan optional timeout
asyncCallback AsyncCallback optional callback to call when the waitHandle signals
state object optional state to pass to the callback
리턴 IDisposable