ObjectPool<T> 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
简单对象池
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)
参数
- factoryFunc
- Func<T>
用于创建新 T 类型的资源的函数
- monitor
- IObjectPoolMonitor
监视以报告对象池的统计信息