public void Start(IFuture future, ISchedulable task, TaskExecutionPolicy executionPolicy) { task.Schedule(this, future); switch (executionPolicy) { case TaskExecutionPolicy.RunAsBackgroundTask: future.RegisterOnComplete(BackgroundTaskOnComplete); break; default: break; } }
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; } }