Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Object"/> class.
 /// </summary>
 public TaskQueue(CancellationTokenSource cancellationTokenSource = null)
 {
     TaskScheduler           = new OrderedTaskScheduler();
     CancellationTokenSource = cancellationTokenSource ?? new CancellationTokenSource();
     TaskFactory             = new TaskFactory(CancellationTokenSource.Token, TaskCreationOptions.HideScheduler, TaskContinuationOptions.None, TaskScheduler);
 }
Ejemplo n.º 2
0
        internal async Task Run()
        {
            _taskScheduler = new OrderedTaskScheduler();

            await this.OnAcvitate();
        }