KestrunRunspacePoolManager.AcquireAsync method

Asynchronously acquires a runspace from the pool, creating a new one if under the cap, or waits until one becomes available.

public Task<Runspace> AcquireAsync(CancellationToken cancellationToken = default)
parameter description
cancellationToken A cancellation token to observe while waiting for a runspace.

Return Value

A task that represents the asynchronous operation, containing the acquired Runspace.

See Also