Table of Contents

Class PooledValueTaskSourceObjectPolicy<T>

Namespace
CryptoHives.Foundation.Threading.Pools
Assembly
CryptoHives.Foundation.Threading.dll

A policy for pooling PooledManualResetValueTaskSource<T> instances.

public class PooledValueTaskSourceObjectPolicy<T> : PooledObjectPolicy<PooledManualResetValueTaskSource<T>>, IPooledObjectPolicy<PooledManualResetValueTaskSource<T>>

Type Parameters

T
Inheritance
PooledValueTaskSourceObjectPolicy<T>
Implements
Inherited Members

Methods

Create()

Create a CryptoHives.Foundation.Threading.Pools.PooledManualResetValueTaskSource{`0}.

public override PooledManualResetValueTaskSource<T> Create()

Returns

PooledManualResetValueTaskSource<T>

The CryptoHives.Foundation.Threading.Pools.PooledManualResetValueTaskSource{`0} which was created.

Return(PooledManualResetValueTaskSource<T>)

Runs some processing when an object was returned to the pool. Can be used to reset the state of an object and indicate if the object should be returned to the pool.

public override bool Return(PooledManualResetValueTaskSource<T> obj)

Parameters

obj PooledManualResetValueTaskSource<T>

The object to return to the pool.

Returns

bool

true if the object should be returned to the pool. false if it's not possible/desirable for the pool to keep the object.