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