mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-22 23:58:48 +00:00
parent
16f0a8a869
commit
f980ade3a8
@ -1,7 +1,7 @@
|
|||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace X10D
|
namespace X10D.WaitHandleExtensions
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Extension methods for <see cref="WaitHandle" />.
|
/// Extension methods for <see cref="WaitHandle" />.
|
||||||
@ -15,7 +15,7 @@ namespace X10D
|
|||||||
/// <returns>Returns a task which wraps <see cref="WaitHandle.WaitOne()" />.</returns>
|
/// <returns>Returns a task which wraps <see cref="WaitHandle.WaitOne()" />.</returns>
|
||||||
public static Task WaitOneAsync(this WaitHandle handle)
|
public static Task WaitOneAsync(this WaitHandle handle)
|
||||||
{
|
{
|
||||||
return new Task(() => handle.WaitOne());
|
return new(() => handle.WaitOne());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user