KestrunHost.CreateRunspacePool method
Creates and returns a new KestrunRunspacePoolManager instance with the specified maximum number of runspaces.
public KestrunRunspacePoolManager CreateRunspacePool(int? maxRunspaces = 0,
Dictionary<string, object>? userVariables = null,
Dictionary<string, string>? userFunctions = null)
| parameter | description |
|---|---|
| maxRunspaces | The maximum number of runspaces to create. If not specified or zero, defaults to twice the processor count. |
| userVariables | A dictionary of user-defined variables to inject into the runspace pool. |
| userFunctions | A dictionary of user-defined functions to inject into the runspace pool. |
Return Value
A configured KestrunRunspacePoolManager instance.
See Also
- class KestrunRunspacePoolManager
- class KestrunHost
- namespace Kestrun.Hosting