A* Pathfinding Project  4.3.5
The A* Pathfinding Project for Unity 3D
IJobExtensions Class Reference

Extension methods for IJob and related interfaces. More...

Detailed Description

Extension methods for IJob and related interfaces.

Classes

struct  ManagedActionJob
 
struct  ManagedJob
 
struct  ManagedJobParallelForBatch
 

Static Public Member Functions

static JobHandle GetDependencies< T > (this T data, JobDependencyTracker tracker)
 
static JobHandle Schedule< T > (this T data, JobDependencyTracker tracker)
 Schedule a job and handle dependencies automatically. More...
 
static JobHandle ScheduleBatch< T > (this T data, int arrayLength, int minIndicesPerJobCount, JobDependencyTracker tracker, JobHandle additionalDependency=default)
 
static JobHandle ScheduleManaged (this System.Action data, JobHandle dependsOn)
 
static JobHandle ScheduleManaged< T > (this T data, JobHandle dependsOn)
 
static JobHandle ScheduleManagedInMainThread< T > (this T data, JobDependencyTracker tracker)
 Schedules a job to run in the main Unity thread. More...
 

Static Private Attributes

static readonly UnityEngine.Profiling.CustomSampler waitingForMainThreadSampler = UnityEngine.Profiling.CustomSampler.Create("Waiting for main thread work (sleep)")
 

Member Function Documentation

◆ GetDependencies< T >()

static JobHandle GetDependencies< T > ( this T  data,
JobDependencyTracker  tracker 
)
static
Type Constraints
T :struct 
T :IJob 

◆ Schedule< T >()

static JobHandle Schedule< T > ( this T  data,
JobDependencyTracker  tracker 
)
static

Schedule a job and handle dependencies automatically.

You need to have "using Pathfinding.Util" in your script to be able to use this extension method.

See also
#Pathfinding.Util.JobDependencyTracker
Type Constraints
T :struct 
T :IJob 

◆ ScheduleBatch< T >()

static JobHandle ScheduleBatch< T > ( this T  data,
int  arrayLength,
int  minIndicesPerJobCount,
JobDependencyTracker  tracker,
JobHandle  additionalDependency = default 
)
static
Type Constraints
T :struct 
T :IJobParallelForBatch 

◆ ScheduleManaged()

static JobHandle ScheduleManaged ( this System.Action  data,
JobHandle  dependsOn 
)
static

◆ ScheduleManaged< T >()

static JobHandle ScheduleManaged< T > ( this T  data,
JobHandle  dependsOn 
)
static
Type Constraints
T :struct 
T :IJob 

◆ ScheduleManagedInMainThread< T >()

static JobHandle ScheduleManagedInMainThread< T > ( this T  data,
JobDependencyTracker  tracker 
)
static

Schedules a job to run in the main Unity thread.

You must call #JobDependencyTracker.RunMainThreadWork() repeatedly in the main thread to allow the work to be done.

Warning
This method is to be avoided unless absolutely necessary. It may cause a worker thread to sleep until the main thread has had time to run the job, preventing other jobs from running in that worker thread.
Note
In the future Unity may allow more direct control over the semaphores used in the job system, and then this method may become more efficient.
Type Constraints
T :struct 
T :IJob 

Member Data Documentation

◆ waitingForMainThreadSampler

readonly UnityEngine.Profiling.CustomSampler waitingForMainThreadSampler = UnityEngine.Profiling.CustomSampler.Create("Waiting for main thread work (sleep)")
staticprivate

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