OrderedTaskScheduler.cs 760 B

1234567891011121314151617181920
  1. //--------------------------------------------------------------------------
  2. //
  3. // Copyright (c) Microsoft Corporation. All rights reserved.
  4. //
  5. // File: OrderedTaskScheduler.cs
  6. //
  7. //--------------------------------------------------------------------------
  8. namespace System.Threading.Tasks.Schedulers
  9. {
  10. /// <summary>
  11. /// Provides a task scheduler that ensures only one task is executing at a time, and that tasks
  12. /// execute in the order that they were queued.
  13. /// </summary>
  14. public sealed class OrderedTaskScheduler : LimitedConcurrencyLevelTaskScheduler
  15. {
  16. /// <summary>Initializes an instance of the OrderedTaskScheduler class.</summary>
  17. public OrderedTaskScheduler() : base(1) { }
  18. }
  19. }