Exemplo n.º 1
0
        public void Start(IFuture future, ISchedulable task, TaskExecutionPolicy executionPolicy)
        {
            task.Schedule(this, future);

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

            default:
                break;
            }
        }
Exemplo n.º 2
0
        public void Start <T> (Future <T> future, ISchedulable <T> task, TaskExecutionPolicy executionPolicy)
        {
            using (IsActive)
                task.Schedule(this, future);

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

            default:
                break;
            }
        }