Click or drag to resize

ManagedThread Class

Defines a managed thread
Inheritance Hierarchy
SystemObject
  GSF.ThreadingManagedThread

Namespace: GSF.Threading
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.218-beta+101eee949414e414795e55a6e73d88938f0177b8
Syntax
public sealed class ManagedThread
View Source

The ManagedThread type exposes the following members.

Constructors
 NameDescription
Public methodManagedThread(ParameterizedThreadStart) Initializes a new instance of the ManagedThread class, specifying a delegate that allows an object to be passed to the thread when the thread is started.
Public methodManagedThread(ThreadStart) Initializes a new instance of the ManagedThread class.
Public methodManagedThread(ContextCallback, ExecutionContext) Initializes a new instance of the ManagedThread class, specifying a delegate that allows an object to be passed to the thread when the thread is started and allowing the user to specify an alternate execution context for the thread.
Top
Properties
 NameDescription
Public propertyIsAlive Gets a value indicating the execution status of the current thread.
Public propertyName Gets or sets the name of the thread.
Public propertyPriority Gets or sets a value indicating the scheduling priority of a thread.
Public propertyRunTime Gets the total amount of time, in seconds, that the managed thread has been active.
Public propertyStartTime Get the time, in ticks, that the thread started executing
Public propertyState An object containing data to be used by the thread's execution method.
Public propertyStatus Gets a value containing the curretn status of the current thread.
Public propertyStopTime Get the time, in ticks, that the thread finished executing
Public propertyTag An object that allows additional user defined information to be tracked along with this thread.
Public propertyType Returns the managed thread type (either StandardThread or QueuedThread)
Top
Methods
 NameDescription
Public methodAbort Raises a ThreadAbortException in the thread on which it is invoked, to begin the process of terminating the thread. Calling this method usually terminates the thread.
Public methodAbort(Object) Raises a ThreadAbortException in the thread on which it is invoked, to begin the process of terminating the thread. Calling this method usually terminates the thread.
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodJoin Blocks the calling thread until a thread terminates or the specified time elapses, while continuing to perform standard COM and SendMessage pumping.
Public methodJoin(Int32) Blocks the calling thread until a thread terminates or the specified time elapses, while continuing to perform standard COM and SendMessage pumping.
Public methodJoin(TimeSpan) Blocks the calling thread until a thread terminates or the specified time elapses, while continuing to perform standard COM and SendMessage pumping.
Public methodStart Causes a thread to be scheduled for execution.
Public methodStart(Object) Causes a thread to be scheduled for execution.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Extension Methods
 NameDescription
Public Extension MethodGetEnumValueOrDefault Gets the enumeration constant for value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Public Extension MethodGetEnumValueOrDefaultT Gets the enumeration constant for this value, if defined in the enumeration, or a default value.
(Defined by EnumExtensions)
Top
Remarks
This class works like any normal thread but provides the benefit of automatic tracking through the ManagedThreads collection, total thread runtime and the ability to run the thread in an alternate execution context
See Also