C# Class GSF.Threading.ScheduledTask

Inheritance: IDisposable
Mostrar archivo Open project: GridProtectionAlliance/gsf Class Usage Examples

Public Methods

Method Description
ScheduledTask ( ThreadingMode threadMode = ThreadingMode.ThreadPool, ThreadPriority priority = ThreadPriority.Normal, bool disposeOnShutdown = false ) : System

Creates a ScheduledTask.

Private Methods

Method Description
Dispose ( ) : void
IgnoreShutdownEvent ( ) : void

For foreground threads, a shutdown handler is registered to dispose of the Thread so it doesn't keep the process running. However, for the Logger, shutting down this thread will prevent shutdown messages from showing up in the logger. By calling this method, it declares that the coder will dispose of this class when it is finished and does not want the Shutdown handler to do it.

InternalDisposeAllResources ( ) : void
OnRunningCallback ( ThreadContainerBase args ) : void
Start ( ) : void
Start ( int delay ) : void
TryCallback ( ScheduledTaskRunningReason args ) : void

Method Details

ScheduledTask() public method

Creates a ScheduledTask.
public ScheduledTask ( ThreadingMode threadMode = ThreadingMode.ThreadPool, ThreadPriority priority = ThreadPriority.Normal, bool disposeOnShutdown = false ) : System
threadMode ThreadingMode The manner in which the scheduled task executes.
priority ThreadPriority The thread priority to assign if a dedicated thread is used. This is ignored if using the thread-pool.
disposeOnShutdown bool Adds a handler to that requires this class to be disposed /// when the application is shutdown. Note: If this object has been garbage collected, this will have no effect.
return System