You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Zero/ZeroLevel/Services/Async/Internal/TaskExtensions.cs

15 lines
287 B

using System.Threading.Tasks;
namespace ZeroLevel.Services.Async.Internal
{
internal static class TaskExtensions
{
public static async Task<T> WithYield<T>(this Task<T> task)
{
var result = await task.ConfigureAwait(false);
await Task.Yield();
return result;
}
}
}

Powered by TurnKey Linux.