public void Run(Future future) { CallOnBackground(future); }
object ISynchronizeInvoke.Invoke(Delegate method, object[] args) { Future <object> f = this.CallOnBackground(() => method.DynamicInvoke(args)); return(f.Wait()); }
internal TypedFutureWatcher(SynchronizationContext context, Future <T> wf, Action <FutureWatcherCompleted <T> > callback) : base(context, wf) { m_wf = wf; m_callback = callback; }
internal EmptyFutureWatcher(SynchronizationContext context, Future future, Action <FutureWatcherCompleted> callback) : base(context, future) { m_wf = future; m_callback = callback; }
public static FutureWatcher Create <T>(SynchronizationContext context, Future <T> future, Action <FutureWatcherCompleted <T> > callback) { return(new TypedFutureWatcher <T>(context, future, callback)); }
public static FutureWatcher Create(SynchronizationContext context, Future future, Action <FutureWatcherCompleted> callback) { return(new EmptyFutureWatcher(context, future, callback)); }
private void OnWatchableFutureCompleted(Future future) { m_context.Post(() => OnWatchableFutureCompletedCore()); }