Table of Contents

Class AsyncOperationPool

Namespace
TAssetBundle
Assembly
TAssetBundle.dll

Asynchronous Operation Pool Class

public class AsyncOperationPool : IAsyncOperationPool
Inheritance
AsyncOperationPool
Implements
Inherited Members

Properties

Pools

The internal pools dictionary

public Dictionary<Type, Stack<IAsyncOperation>> Pools { get; }

Property Value

Dictionary<Type, Stack<IAsyncOperation>>

Methods

Clear()

Clears the pool.

public void Clear()

Get<T>()

Retrieves a new asynchronous operation.

public T Get<T>() where T : IAsyncOperation, new()

Returns

T

Type Parameters

T

Push(IAsyncOperation)

Pushes an asynchronous operation back to the pool.

public void Push(IAsyncOperation asyncOperation)

Parameters

asyncOperation IAsyncOperation

TryPop<T>(out T)

Tries to pop an asynchronous operation of a specific type from the pool.

public bool TryPop<T>(out T result) where T : IAsyncOperation

Parameters

result T

Returns

bool

Type Parameters

T