SpicyPixel.Threading.ConcurrentBehaviour Class Reference

Convenience class that extends MonoBehavior to provide a Scheduler and TaskFactory for executing tasks on the behaviour instance. More...

+ Inheritance diagram for SpicyPixel.Threading.ConcurrentBehaviour:
+ Collaboration diagram for SpicyPixel.Threading.ConcurrentBehaviour:

Protected Member Functions

virtual void Awake ()
 Initializes the task factory during Awake(). More...
 

Properties

static ConcurrentBehaviour SharedInstance [get]
 Gets the shared instance valid for the lifetime of the application. More...
 
TaskFactory taskFactory [get]
 Gets the task factory. More...
 
TaskScheduler taskScheduler [get]
 Gets the task scheduler for queuing to this MonoBehaviour. More...
 
FiberFactory fiberFactory [get]
 Gets the fiber factory. More...
 
FiberScheduler fiberScheduler [get]
 Gets the fiber scheduler for queuing to this MonoBehaviour. More...
 

Detailed Description

Convenience class that extends MonoBehavior to provide a Scheduler and TaskFactory for executing tasks on the behaviour instance.

Derived classes must remember to use the override keyword when providing an Awake implementation or the task factory will not be initialized.

Definition at line 45 of file ConcurrentBehaviour.cs.

Member Function Documentation

virtual void SpicyPixel.Threading.ConcurrentBehaviour.Awake ( )
protectedvirtual

Initializes the task factory during Awake().

The task factory cannot be initialized in the constructor because it must be initialized from the coroutine execution thread which the constructor does not guarantee.

Definition at line 114 of file ConcurrentBehaviour.cs.

Property Documentation

FiberFactory SpicyPixel.Threading.ConcurrentBehaviour.fiberFactory
get

Gets the fiber factory.

The fiber factory.

Definition at line 92 of file ConcurrentBehaviour.cs.

FiberScheduler SpicyPixel.Threading.ConcurrentBehaviour.fiberScheduler
get

Gets the fiber scheduler for queuing to this MonoBehaviour.

The fiber scheduler.

Definition at line 102 of file ConcurrentBehaviour.cs.

ConcurrentBehaviour SpicyPixel.Threading.ConcurrentBehaviour.SharedInstance
staticget

Gets the shared instance valid for the lifetime of the application.

The shared instance valid until Unity raises OnApplicationQuit().

This instance can be used to create a scheduler and task factory not bound to a specific MonoBehaviour.

Definition at line 62 of file ConcurrentBehaviour.cs.

TaskFactory SpicyPixel.Threading.ConcurrentBehaviour.taskFactory
get

Gets the task factory.

The task factory.

Definition at line 74 of file ConcurrentBehaviour.cs.

TaskScheduler SpicyPixel.Threading.ConcurrentBehaviour.taskScheduler
get

Gets the task scheduler for queuing to this MonoBehaviour.

The scheduler.

Definition at line 84 of file ConcurrentBehaviour.cs.


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