Click or drag to resize

SingleThreadTaskScheduler Class

A Task Scheduler class that execute tasks in a queue that is dequeued by the same single thread.
Inheritance Hierarchy
SystemObject
  System.Threading.TasksTaskScheduler
    ShellBoost.Core.UtilitiesSingleThreadTaskScheduler

Namespace:  ShellBoost.Core.Utilities
Assembly:  ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.0
Syntax
C#
public sealed class SingleThreadTaskScheduler : TaskScheduler, 
	IDisposable

The SingleThreadTaskScheduler type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyDequeueOnDispose
Gets or sets a value indicating whether to dequeue the remaining tasks when this instance is disposed. Dequeuing will happen on the thread callind Dispose(), not on the scheduler's thread.
Public propertyDequeueTimeout
Gets or sets a value that defines the time to wait between dequeues.
Public propertyDisposeThreadJoinTimeout
Gets or sets a value that defines the maximum time to wait for the thread to finish when this instance is disposed.
Public propertyLastDequeue
Gets a value that indicates the last dequeue time.
Public propertyQueueCount
Gets the number of currently queued tasks.
Public propertyWaitTimeout
Gets or sets a value that defines the maximum time to periodically wait for stop and dequeue events to happen.
Top
Methods
  NameDescription
Public methodClearQueue
Remove all tasks from the queue. Dequeuing will happen on the current thread, not on the scheduler's thread.
Public methodDispose
Releases all resources used by this instance.
Public methodTriggerDequeue
Executes any tasks in queue, sending a dequeue event to the thread.
Top
Events
  NameDescription
Public eventExecuting
Occurs when a task is being executed.
Top
See Also