ObjectPool<T> Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Simple object pool
public ObjectPool (Func<T> factoryFunc, Orleans.Providers.Streams.Common.IObjectPoolMonitor monitor = default, TimeSpan? monitorWriteInterval = default);
new Orleans.Providers.Streams.Common.ObjectPool<'T (requires 'T :> Orleans.Providers.Streams.Common.PooledResource<'T>)> : Func<'T (requires 'T :> Orleans.Providers.Streams.Common.PooledResource<'T>)> * Orleans.Providers.Streams.Common.IObjectPoolMonitor * Nullable<TimeSpan> -> Orleans.Providers.Streams.Common.ObjectPool<'T (requires 'T :> Orleans.Providers.Streams.Common.PooledResource<'T>)>
Public Sub New (factoryFunc As Func(Of T), Optional monitor As IObjectPoolMonitor = Nothing, Optional monitorWriteInterval As Nullable(Of TimeSpan) = Nothing)
Parameters
- factoryFunc
- Func<T>
Function used to create new resources of type T
- monitor
- IObjectPoolMonitor
monitor to report statistics for object pool