This topic has not yet been rated - Rate this topic

PSThreadOptions Enumeration

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

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)
'Usage
Dim instance As PSThreadOptions

public enum PSThreadOptions
public enum PSThreadOptions
public enum PSThreadOptions
Member name Description
Default On the local computer, UseNewThread is used for runspaces and ReuseThread is used for runspace pools. Server settings are used for remote runspaces and runspace pools. This field is introduced in Windows PowerShell 2.0.
ReuseThread Creates 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.
UseCurrentThread Execution occurs 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.
UseNewThread Creates a new thread for each invocation. This field is introduced in Windows PowerShell 2.0.

 

Target Platforms

Windows 98, Windows 2000, Windows 2000 Server, Windows CE, Windows Server 2008, Windows 98 Second Edition, Pocket PC, Smart Phone, Windows Server 2003, Windows XP Professional, Windows Vista, Windows Server 2003 R2, Windows XP, Windows 7, Windows 2008 R2, Windows Developer Preview, Windows Server Developer Preview

Send comments about this topic to Microsoft.
Did you find this helpful?
(1500 characters remaining)