Property | Type | Description | |
---|---|---|---|
RequeueTask | void | ||
Start | void | ||
StartSpawn | UnityEngine.GameObject | ||
Update | void |
Method | Description | |
---|---|---|
Schedule ( Action |
Schedules a task to be run in Hikari.
|
|
Schedule ( System to_schedule, bool cancel_extensions_on_abort = true ) : EnumeratorTask |
Schedules a task to be run in Hikari. Enumerator tasks may yield null to allow napping, or yield another Task to nap until that task finishes, then start up again.
|
|
ScheduleUnity ( Action |
Schedules a task to be run on Unity's thread.
|
|
ScheduleUnity ( System to_schedule, bool cancel_extensions_on_abort = true ) : EnumeratorTask |
Schedules a task to be run on Unity's thread. Enumerator tasks may yield null to allow napping, or yield another Task to nap until that task finishes, then start up again.
|
|
Spawn ( ) : UnityEngine.GameObject |
Starts up Hikari with all the default options. Not necessary to call, but if you don't a GameObject will be spawned the first time you call Hikari. The spawned GameObject will be set to not destroy on load. Spawn is not threadsafe.
|
|
Spawn ( int max_tasks_per_frame ) : UnityEngine.GameObject |
Starts up Hikari with all the default options. Not necessary to call, but if you don't a GameObject will be spawned the first time you call Hikari. The spawned GameObject will be set to not destroy on load. Spawn is not threadsafe.
|
|
Spawn ( int min_threads, int max_threads ) : UnityEngine.GameObject |
Starts up Hikari with all the default options. Not necessary to call, but if you don't a GameObject will be spawned the first time you call Hikari. The spawned GameObject will be set to not destroy on load. Spawn is not threadsafe.
|
|
Spawn ( int max_tasks_per_frame, int min_threads, int max_threads ) : UnityEngine.GameObject |
Starts up Hikari with all the default options. Not necessary to call, but if you don't a GameObject will be spawned the first time you call Hikari. The spawned GameObject will be set to not destroy on load. Spawn is not threadsafe.
|
|
Spawn ( int max_tasks_per_frame, int min_threads, int max_threads, System.TimeSpan min_ms_between_thread_spawn, System.TimeSpan max_ms_task_waiting_before_thread_spawn, uint max_queue_length_before_thread_spawn, System.TimeSpan max_boredom_time_before_thread_despawn ) : UnityEngine.GameObject |
Starts up Hikari with all the default options. Not necessary to call, but if you don't a GameObject will be spawned the first time you call Hikari. The spawned GameObject will be set to not destroy on load. Spawn is not threadsafe.
|
|
Spawn ( ) : void | ||
SpawnDedicatedTask ( Action |
Creates a dedicated task and a thread for it. Dedicated tasks will not relinquish control of their thread while napping, allowing them to restart immediately after napping. Once the task has completed, its thread will be recycled in Hikari and may be used for other tasks.
|
|
SpawnDedicatedTask ( System task, bool cancel_extensions_on_abort = true ) : EnumeratorTask |
Creates a dedicated task and a thread for it. Dedicated tasks will not relinquish control of their thread while napping, allowing them to restart immediately after napping. Once the task has completed, its thread will be recycled in Hikari and may be used for other tasks. Enumerator tasks may yield null to allow napping, or yield another Task to nap until that task finishes, then start up again.
|
Method | Description | |
---|---|---|
RequeueTask ( ITask task ) : void |
Re-enters the passed Task into the Thread- or UnityManager (based on which it started in). This should only be called when the Task is already completed.
|
|
Start ( ) : void |
Failsafe so that no one accidentally creates a Hikari object.
|
|
StartSpawn ( ) : UnityEngine.GameObject |
This does the reusable parts of the overloaded Spawn() method.
|
|
Update ( ) : void |
Unity's update loop. All we need to do is update the managers.
|
public static Schedule ( Action |
||
to_schedule | Action |
The method to run in the task. |
cancel_extensions_on_abort | bool | Whether or not to cancel extensions automatically when the Task is aborted. Defaults to true. |
return | ActionTask |
public static Schedule ( System to_schedule, bool cancel_extensions_on_abort = true ) : EnumeratorTask | ||
to_schedule | System | The enumerator to run in the task. |
cancel_extensions_on_abort | bool | Whether or not to cancel extensions automatically when the Task is aborted. Defaults to true. |
return | EnumeratorTask |
public static ScheduleUnity ( Action |
||
to_schedule | Action |
The method to run in the task. |
cancel_extensions_on_abort | bool | Whether or not to cancel extensions automatically when the Task is aborted. Defaults to true. |
return | ActionTask |
public static ScheduleUnity ( System to_schedule, bool cancel_extensions_on_abort = true ) : EnumeratorTask | ||
to_schedule | System | The enumerator to run in the task. |
cancel_extensions_on_abort | bool | Whether or not to cancel extensions automatically when the Task is aborted. Defaults to true. |
return | EnumeratorTask |
public static Spawn ( ) : UnityEngine.GameObject | ||
return | UnityEngine.GameObject |
public static Spawn ( int max_tasks_per_frame ) : UnityEngine.GameObject | ||
max_tasks_per_frame | int | The maximum number of Tasks for Hikari to run in Unity per frame. |
return | UnityEngine.GameObject |
public static Spawn ( int min_threads, int max_threads ) : UnityEngine.GameObject | ||
min_threads | int | The minimum number of Threads for Hikari to have spawned at once. |
max_threads | int | The maximum number of Threads for Hikari to have spawned at once. Dedicated Tasks may cause Hikari to go over this maximum. |
return | UnityEngine.GameObject |
public static Spawn ( int max_tasks_per_frame, int min_threads, int max_threads ) : UnityEngine.GameObject | ||
max_tasks_per_frame | int | The maximum number of Tasks for Hikari to run in Unity per frame. |
min_threads | int | The minimum number of Threads for Hikari to have spawned at once. |
max_threads | int | The maximum number of Threads for Hikari to have spawned at once. Dedicated Tasks may cause Hikari to go over this maximum. |
return | UnityEngine.GameObject |
public static Spawn ( int max_tasks_per_frame, int min_threads, int max_threads, System.TimeSpan min_ms_between_thread_spawn, System.TimeSpan max_ms_task_waiting_before_thread_spawn, uint max_queue_length_before_thread_spawn, System.TimeSpan max_boredom_time_before_thread_despawn ) : UnityEngine.GameObject | ||
max_tasks_per_frame | int | The maximum number of Tasks for Hikari to run in Unity per frame. |
min_threads | int | The minimum number of Threads for Hikari to have spawned at once. |
max_threads | int | The maximum number of Threads for Hikari to have spawned at once. Dedicated Tasks may cause Hikari to go over this maximum. |
min_ms_between_thread_spawn | System.TimeSpan | The minimum amount of time to wait before spawning a new thread. |
max_ms_task_waiting_before_thread_spawn | System.TimeSpan | The maximum time that a Task can be waiting in the queue before we spawn a new thread. |
max_queue_length_before_thread_spawn | uint | The maximum number of Tasks waiting in queue before we spawn a new thread. |
max_boredom_time_before_thread_despawn | System.TimeSpan | The maximum amount of time a thread can be idle before despawning the thread. |
return | UnityEngine.GameObject |
public static SpawnDedicatedTask ( Action |
||
task | Action |
The action to run on the new dedicated task. |
cancel_extensions_on_abort | bool | Whether or not to cancel extensions automatically when the Task is aborted. Defaults to true. |
return | ActionTask |
public static SpawnDedicatedTask ( System task, bool cancel_extensions_on_abort = true ) : EnumeratorTask | ||
task | System | The enumerator to run on the new dedicated task. |
cancel_extensions_on_abort | bool | Whether or not to cancel extensions automatically when the Task is aborted. Defaults to true. |
return | EnumeratorTask |