Represents an operating system process thread.
More...
|
void | ResetIdealProcessor () |
| Resets the ideal processor for this thread to indicate that there is no single ideal processor. In other words, so that any processor is ideal. More...
|
|
void | Dispose () |
| Releases all resources used by the T:System.ComponentModel.Component. More...
|
|
override string | ToString () |
| Returns a T:System.String containing the name of the T:System.ComponentModel.Component, if any. This method should not be overridden. More...
|
|
object | GetLifetimeService () |
| Retrieves the current lifetime service object that controls the lifetime policy for this instance. More...
|
|
virtual object | InitializeLifetimeService () |
| Obtains a lifetime service object to control the lifetime policy for this instance. More...
|
|
virtual ObjRef | CreateObjRef (Type requestedType) |
| Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. More...
|
|
|
virtual void | Dispose (bool disposing) |
| Releases the unmanaged resources used by the T:System.ComponentModel.Component and optionally releases the managed resources. More...
|
|
virtual object | GetService (Type service) |
| Returns an object that represents a service provided by the T:System.ComponentModel.Component or by its T:System.ComponentModel.Container. More...
|
|
MarshalByRefObject | MemberwiseClone (bool cloneIdentity) |
| Creates a shallow copy of the current T:System.MarshalByRefObject object. More...
|
|
virtual bool | CanRaiseEvents => true |
| Gets a value indicating whether the component can raise an event. More...
|
|
EventHandler | Disposed |
| Represents the method that handles the E:System.ComponentModel.IComponent.Disposed event of a component. More...
|
|
Represents an operating system process thread.
Definition at line 12 of file ProcessThread.cs.
◆ ResetIdealProcessor()
void System.Diagnostics.ProcessThread.ResetIdealProcessor |
( |
| ) |
|
Resets the ideal processor for this thread to indicate that there is no single ideal processor. In other words, so that any processor is ideal.
- Exceptions
-
T:System.ComponentModel.Win32Exception | The ideal processor could not be reset. |
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 360 of file ProcessThread.cs.
◆ BasePriority
int System.Diagnostics.ProcessThread.BasePriority |
|
get |
Gets the base priority of the thread.
- Returns
- The base priority of the thread, which the operating system computes by combining the process priority class with the priority level of the associated thread.
Definition at line 36 of file ProcessThread.cs.
◆ CurrentPriority
int System.Diagnostics.ProcessThread.CurrentPriority |
|
get |
Gets the current priority of the thread.
- Returns
- The current priority of the thread, which may deviate from the base priority based on how the operating system is scheduling the thread. The priority may be temporarily boosted for an active thread.
Definition at line 47 of file ProcessThread.cs.
◆ Id
int System.Diagnostics.ProcessThread.Id |
|
get |
Gets the unique identifier of the thread.
- Returns
- The unique identifier associated with a specific thread.
Definition at line 58 of file ProcessThread.cs.
◆ IdealProcessor
int System.Diagnostics.ProcessThread.IdealProcessor |
|
set |
Sets the preferred processor for this thread to run on.
- Returns
- The preferred processor for the thread, used when the system schedules threads, to determine which processor to run the thread on.
- Exceptions
-
T:System.ComponentModel.Win32Exception | The system could not set the thread to start on the specified processor. |
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 72 of file ProcessThread.cs.
◆ PriorityBoostEnabled
bool System.Diagnostics.ProcessThread.PriorityBoostEnabled |
|
getset |
Gets or sets a value indicating whether the operating system should temporarily boost the priority of the associated thread whenever the main window of the thread's process receives the focus.
- Returns
true
to boost the thread's priority when the user interacts with the process's interface; otherwise, false
. The default is false
.
- Exceptions
-
T:System.ComponentModel.Win32Exception | The priority boost information could not be retrieved.-or-The priority boost information could not be set. |
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 99 of file ProcessThread.cs.
◆ PriorityLevel
Gets or sets the priority level of the thread.
- Returns
- One of the T:System.Diagnostics.ThreadPriorityLevel values, specifying a range that bounds the thread's priority.
- Exceptions
-
T:System.ComponentModel.Win32Exception | The thread priority level information could not be retrieved. -or-The thread priority level could not be set. |
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 150 of file ProcessThread.cs.
◆ PrivilegedProcessorTime
TimeSpan System.Diagnostics.ProcessThread.PrivilegedProcessorTime |
|
get |
Gets the amount of time that the thread has spent running code inside the operating system core.
- Returns
- A T:System.TimeSpan indicating the amount of time that the thread has spent running code inside the operating system core.
- Exceptions
-
T:System.ComponentModel.Win32Exception | The thread time could not be retrieved. |
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 200 of file ProcessThread.cs.
◆ ProcessorAffinity
IntPtr System.Diagnostics.ProcessThread.ProcessorAffinity |
|
set |
Sets the processors on which the associated thread can run.
- Returns
- An T:System.IntPtr that points to a set of bits, each of which represents a processor that the thread can run on.
- Exceptions
-
T:System.ComponentModel.Win32Exception | The processor affinity could not be set. |
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 307 of file ProcessThread.cs.
◆ StartAddress
IntPtr System.Diagnostics.ProcessThread.StartAddress |
|
get |
Gets the memory address of the function that the operating system called that started this thread.
- Returns
- The thread's starting address, which points to the application-defined function that the thread executes.
- Exceptions
-
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 214 of file ProcessThread.cs.
◆ StartTime
DateTime System.Diagnostics.ProcessThread.StartTime |
|
get |
Gets the time that the operating system started the thread.
- Returns
- A T:System.DateTime representing the time that was on the system when the operating system started the thread.
- Exceptions
-
T:System.ComponentModel.Win32Exception | The thread time could not be retrieved. |
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 229 of file ProcessThread.cs.
◆ ThreadState
ThreadState System.Diagnostics.ProcessThread.ThreadState |
|
get |
Gets the current state of this thread.
- Returns
- A T:System.Diagnostics.ThreadState that indicates the thread's execution, for example, running, waiting, or terminated.
- Exceptions
-
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 243 of file ProcessThread.cs.
◆ TotalProcessorTime
TimeSpan System.Diagnostics.ProcessThread.TotalProcessorTime |
|
get |
Gets the total amount of time that this thread has spent using the processor.
- Returns
- A T:System.TimeSpan that indicates the amount of time that the thread has had control of the processor.
- Exceptions
-
T:System.ComponentModel.Win32Exception | The thread time could not be retrieved. |
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 258 of file ProcessThread.cs.
◆ UserProcessorTime
TimeSpan System.Diagnostics.ProcessThread.UserProcessorTime |
|
get |
Gets the amount of time that the associated thread has spent running code inside the application.
- Returns
- A T:System.TimeSpan indicating the amount of time that the thread has spent running code inside the application, as opposed to inside the operating system core.
- Exceptions
-
T:System.ComponentModel.Win32Exception | The thread time could not be retrieved. |
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 273 of file ProcessThread.cs.
◆ WaitReason
Gets the reason that the thread is waiting.
- Returns
- A T:System.Diagnostics.ThreadWaitReason representing the reason that the thread is in the wait state.
- Exceptions
-
T:System.InvalidOperationException | The thread is not in the wait state. |
T:System.PlatformNotSupportedException | The platform is Windows 98 or Windows Millennium Edition. |
T:System.NotSupportedException | The process is on a remote computer. |
Definition at line 288 of file ProcessThread.cs.
The documentation for this class was generated from the following file: