Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


IJobParallelForExtensions

Contains extension methods for jobs implementing the IJobParallelFor interface.
Read time 1 minuteLast updated 11 days ago

Definition

  • Type: Class
  • Namespace: Unity.Jobs
  • Assembly: UnityEngine.CoreModule
public static class IJobParallelForExtensions

Remarks

The methods in this extension class add an instance of a job to the work queue, while IJobParallelFor.Execute defines how to perform an asynchronous task. Use IJobParallelForExtensions.ScheduleByRef to request asynchronous execution, or IJobParallelForExtensions.RunByRef to execute the job immediately on the main thread.
Additional Resources: IJobFor.

Examples

{code Tests/EditModeAndPlayModeTests/Jobs/Assets/DocumentationExamples/ManagedJobDocExamples.cs#ijobparallelfor-apidocs-example}

Static Methods

Method

Description

EarlyJobInitGathers and caches reflection data for the internal job system's managed bindings.
RunPerforms the job's Execute method immediately on the same thread.
RunByRefPerforms the job's Execute method immediately on the same thread.
ScheduleSchedules the job to execute concurrently on multiple worker threads.
ScheduleByRefSchedules the job to execute concurrently, distributing work across multiple worker threads.