Exemplo n.º 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));
        }
Exemplo n.º 2
0
 public SchedulerContext(SharedScheduler dispatcher, SharedScheduler @default)
 {
     _dispatcher = dispatcher;
     _default    = @default;
 }