Click or drag to resize
BackgroundThreadQueueT Class
A class that wraps a queue of objects that one thread pushes onto while a background thread pops and processes them.
Inheritance Hierarchy
SystemObject
  VirtualRadar.InterfaceBackgroundThreadQueueT

Namespace: VirtualRadar.Interface
Assembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public class BackgroundThreadQueue<T> : IQueue, 
	IDisposable
where T : class

Type Parameters

T

The BackgroundThreadQueueT type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCountDroppedItems
See interface docs.
Public propertyCountQueuedItems
See interface docs.
Public propertyMaximumParallelThreads
Gets or sets the maximum number of parallel threads used when the mechanism is ThreadPool. Has no effect with other mechanisms, or if the queue has already been started.
Public propertyMaxQueuedItems
The maximum number of items allowed in the queue.
Public propertyName
See interface docs.
Public propertyPeakQueuedItems
See interface docs.
Top
Methods
  NameDescription
Public methodClear
Removes all entries from the queue in a single operation.
Public methodDispose
See interface docs.
Protected methodDispose(Boolean)
Disposes of or finalises the object.
Public methodEnqueue
Adds a new item to the queue and signals the background thread that there is something to process.
Public methodEnqueueRange
Adds many items to the queue simultaneously.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Finalises the object.
(Overrides ObjectFinalize.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStartBackgroundThread
Creates and starts the background thread that will pop objects from the queue and process them.
Public methodStop
Stops processing items. Once the queue has stopped it cannot be restarted.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
This can be told to force everything onto a single thread by unit tests via the IRuntimeEnvironment interface.
See Also