예제 #1
0
        /// <summary>
        /// Starts a Task on the specified scheduler
        /// </summary>
        public static Task <TResult> StartNew <TResult>(this TaskFactory factory, Func <TResult> operation,
                                                        SharedScheduler scheduler = null)
        {
            var s = scheduler ?? TaskScheduler.Default;

            return(new TaskFactory(s).StartNew(operation));
        }
예제 #2
0
 public SchedulerContext(SharedScheduler dispatcher, SharedScheduler @default)
 {
     _dispatcher = dispatcher;
     _default    = @default;
 }