Expand Minimize

PSThreadOptions Enumeration

Defines how threads are created and used when a command is executed within a runspace. This enumeration is introduced in Windows PowerShell 2.0.


Namespace: System.Management.Automation.Runspaces
Assembly: System.Management.Automation (in System.Management.Automation.dll)

'Usage
Dim instance As PSThreadOptions

public enum PSThreadOptions
public enum PSThreadOptions
public enum PSThreadOptions

Member nameDescription
DefaultOn the local computer, operates through UseNewThread for runspaces and ReuseThread for runspace pools. Server settings are used for remote runspaces and runspace pools. This field is introduced in Windows PowerShell 2.0.
ReuseThreadCreates a new thread for the first invocation and then re-uses that thread in subsequent invocations. This field is introduced in Windows PowerShell 2.0.
UseCurrentThreadExecutes on the thread that called the Invoke method. This option is not valid for asynchronous calls. This field is introduced in Windows PowerShell 2.0.
UseNewThreadCreates a new thread for each invocation. This field is introduced in Windows PowerShell 2.0.

 

Target Platforms


Show:
© 2015 Microsoft