Particle Playground - Script Reference  3.0.1
Framework for controlling particles in the Unity Engine.
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
ParticlePlayground.PlaygroundQueue< T > Class Template Reference

The Playground Queue class is a self-managed thread pool which consumes actions sent into EnqueueTask(Action). More...

Inheritance diagram for ParticlePlayground.PlaygroundQueue< T >:

Public Member Functions

 PlaygroundQueue (int workerCount, Action< T > dequeueAction)
 Initializes a new instance of the PlaygroundQueue{T} class. More...
 
bool HasPool ()
 
bool HasTasks ()
 
int ThreadPoolCount ()
 
int TaskCount ()
 
void SetThreadPool (int amount)
 Resizes the thread pool. More...
 
void EnqueueTask (T task)
 Enqueues an asynchronous task to run on a separate thread. More...
 
void Dispose ()
 Disposes all worker threads. More...
 

Detailed Description

The Playground Queue class is a self-managed thread pool which consumes actions sent into EnqueueTask(Action).

Type Constraints
T :class 

Constructor & Destructor Documentation

ParticlePlayground.PlaygroundQueue< T >.PlaygroundQueue ( int  workerCount,
Action< T >  dequeueAction 
)

Initializes a new instance of the PlaygroundQueue{T} class.

Parameters
workerCountThe amount of worker threads.
dequeueActionThe dequeue action.

Member Function Documentation

void ParticlePlayground.PlaygroundQueue< T >.Dispose ( )

Disposes all worker threads.

void ParticlePlayground.PlaygroundQueue< T >.EnqueueTask ( task)

Enqueues an asynchronous task to run on a separate thread.

Parameters
taskThe task to be run on a separate thread.
void ParticlePlayground.PlaygroundQueue< T >.SetThreadPool ( int  amount)

Resizes the thread pool.

Parameters
amountThe amount of available threads in the pool.

The documentation for this class was generated from the following file: