예제 #1
0
 private void RegisterOnResolved_Impl(IFuture f, Delegate handler, bool skipQueueOnMainThread = false)
 {
     f.RegisterOnResolved(
         skipQueueOnMainThread
             ? OnResolvedDispatcher_SkipQueue
             : OnResolvedDispatcher,
         handler
         );
 }
예제 #2
0
        public void Start(IFuture future, ISchedulable task, TaskExecutionPolicy executionPolicy)
        {
            using (IsActive)
                task.Schedule(this, future);

            switch (executionPolicy)
            {
            case TaskExecutionPolicy.RunAsBackgroundTask:
                future.RegisterOnResolved(BackgroundTaskOnComplete);
                break;

            default:
                break;
            }
        }
예제 #3
0
 public void OnCompleted(Action continuation)
 {
     Future.RegisterOnResolved(Registration.OnCompleteWithUserData(continuation), Registration);
 }