C# Class GSF.Threading.ManagedThreads

Maintains a reference to all managed threads
ファイルを表示 Open project: GridProtectionAlliance/gsf Class Usage Examples

Public Methods

Method Description
Cancel ( GSF.Threading.ManagedThread item, bool allowAbort, object stateInfo ) : void

Removes a queued thread from thread pool if still queued, if allowAbort is True aborts the thread if executing (standard or queued)

Private Methods

Method Description
Add ( GSF.Threading.ManagedThread item ) : void

Add an item to the active thread list

Typically only used by standard threads when user calls "Start"

ManagedThreads ( ) : System
Pop ( ) : GSF.Threading.ManagedThread

Removes first item from the queue and transfers the item to the active thread list

Queue ( GSF.Threading.ManagedThread item ) : void

Queue thread for processing

Typically only used by queued threads to add work items to the queue

Remove ( GSF.Threading.ManagedThread item ) : void

Remove completed thread from active thread list

ThreadStatusText ( GSF.Threading.ManagedThread item ) : string

Method Details

Cancel() public static method

Removes a queued thread from thread pool if still queued, if allowAbort is True aborts the thread if executing (standard or queued)
public static Cancel ( GSF.Threading.ManagedThread item, bool allowAbort, object stateInfo ) : void
item GSF.Threading.ManagedThread Thread to cancel
allowAbort bool Set to True to abort thread if executing
stateInfo object An object that contains application-specific information, such as state, which can be used by the thread being aborted.
return void