public FutureAwaiter(Future <TResult> future) { Registration = new CancellationScope.Registration(); Future = future; HasDisposedValue = false; DisposedValue = default(TResult); }
public FutureAwaiter(FutureWithDisposedValue <TResult> fwdv) { Registration = new CancellationScope.Registration(); Future = fwdv.Future; HasDisposedValue = true; DisposedValue = fwdv.DisposedValue; }
public ISchedulableAwaiter(ISchedulable schedulable) { Registration = new CancellationScope.Registration(TaskScheduler.Current); Schedulable = schedulable; var ts = (TaskScheduler)Registration.Scheduler; Future = ts.Start(schedulable, TaskExecutionPolicy.RunWhileFutureLives); }
public SequenceAwaiter(Future <T>[] futures) { Registration = new CancellationScope.Registration(); Futures = futures; if (Futures.Length == 0) { Ready = new SignalFuture(true); return; } Ready = Future.WaitForAll(futures); }
public SequenceAwaiter(Future <T>[] futures) { Registration = new CancellationScope.Registration(TaskScheduler.Current); Futures = futures; if (Futures.Length == 0) { Ready = SignalFuture.Signaled; return; } Ready = Future.WaitForAll(futures); }
public SequenceAwaiter(ISchedulable <T>[] schedulables) { Registration = new CancellationScope.Registration(); Futures = new Future <T> [schedulables.Length]; if (Futures.Length == 0) { Ready = new SignalFuture(true); return; } for (var i = 0; i < Futures.Length; i++) { Futures[i] = Registration.Scheduler.Start(schedulables[i]); } Ready = Future.WaitForAll(Futures); }
public SequenceAwaiter(ISchedulable <T>[] schedulables) { Registration = new CancellationScope.Registration(TaskScheduler.Current); Futures = new Future <T> [schedulables.Length]; if (Futures.Length == 0) { Ready = SignalFuture.Signaled; return; } var ts = (TaskScheduler)Registration.Scheduler; for (var i = 0; i < Futures.Length; i++) { Futures[i] = ts.Start(schedulables[i]); } Ready = Future.WaitForAll(Futures); }
public IFutureAwaiter(IFuture future) { Registration = new CancellationScope.Registration(); Future = future; }
public ISchedulableAwaiter(ISchedulable schedulable) { Registration = new CancellationScope.Registration(); Schedulable = schedulable; Future = Registration.Scheduler.Start(schedulable, TaskExecutionPolicy.RunWhileFutureLives); }
public VoidFutureAwaiter(Future <NoneType> future) { Registration = new CancellationScope.Registration(); Future = future; }