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)
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.

Return Value

A configured KestrunRunspacePoolManager instance.

See Also