This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class AwaitExtensions | |
{ | |
/// <summary> | |
/// Provides await functionality for ordinary <see cref="WaitHandle"/>s. | |
/// </summary> | |
/// <param name="handle">The handle to wait on.</param> | |
/// <returns>The awaiter.</returns> | |
public static TaskAwaiter GetAwaiter(this WaitHandle handle) | |
{ | |
Contract.Requires<ArgumentNullException>(handle != null); |