ZeroSizeThreadPool Class

Quartz.NET 3.0 API Documentation
This is class is a simple implementation of a zero size thread pool, based on the IThreadPool interface.
Inheritance Hierarchy

SystemObject
  Quartz.SimplZeroSizeThreadPool

Namespace:  Quartz.Simpl
Assembly:  Quartz (in Quartz.dll) Version: 3.0.0
Syntax

C#
public class ZeroSizeThreadPool : IThreadPool

The ZeroSizeThreadPool type exposes the following members.

Constructors

  NameDescription
Public methodZeroSizeThreadPool
Initializes a new instance of the ZeroSizeThreadPool class.
Top
Properties

  NameDescription
Public propertyAvailableThreadCount
Public propertyInstanceId
Inform the IThreadPool of the Scheduler instance's Id, prior to initialize being invoked.
Public propertyInstanceName
Inform the IThreadPool of the Scheduler instance's name, prior to initialize being invoked.
Public propertyPoolSize
Gets the size of the pool.
Top
Methods

  NameDescription
Public methodBlockForAvailableThreads
Determines the number of threads that are currently available in the pool. Useful for determining the number of times RunInThread(FuncTask) can be called before returning false.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitialize
Called by the QuartzScheduler before the thread pool is used, in order to give the it a chance to Initialize.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRunInThread
Execute the given Task in the next available Thread.
Public methodShutdown
Called by the QuartzScheduler to inform the thread pool that it should free up all of it's resources because the scheduler is shutting down.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

The pool has zero Threads and does not grow or shrink based on demand. Which means it is obviously not useful for most scenarios. When it may be useful is to prevent creating any worker threads at all - which may be desirable for the sole purpose of preserving system resources in the case where the scheduler instance only exists in order to schedule jobs, but which will never execute jobs (e.g. will never have Start() called on it).
See Also

Reference