public void CompleteFuture(Future <T> future) { future.Complete(_Value); }
public static void BindFuture <T> (this System.Threading.Tasks.Task <T> task, Future <T> future) { task.GetAwaiter().OnCompleted(() => { future.SetResult2(task); }); future.RegisterOnDispose((_) => { task.TryCancelScope(); }); }
public static FutureAwaiter <T> GetAwaiter <T> (this Future <T> future) { return(new FutureAwaiter <T>(future)); }
public static VoidFutureAwaiter GetAwaiter(this Future <NoneType> future) { return(new VoidFutureAwaiter(future)); }
public VoidFutureAwaiter(Future <NoneType> future) { Registration = new CancellationScope.Registration(); Future = future; }