using System.Threading.Tasks; namespace ZeroLevel.Services.Async.Internal { internal static class CanceledValueTask { public static readonly ValueTask Value = CreateCanceledTask(); private static ValueTask CreateCanceledTask() { TaskCompletionSource tcs = new TaskCompletionSource(); tcs.SetCanceled(); return new ValueTask(tcs.Task); } } }