Esempio n. 1
0
 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();
     });
 }