# IJobExtensions

> Contains extension methods for jobs implementing the IJob interface.

## Definition

* **Type:** Class
* **Namespace:** [Unity.Jobs](/engine/6000.6/script-reference/unity/jobs.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public static class IJobExtensions
```

## Remarks

The methods in this extension class add an instance of a job to the work queue, while [IJob.Execute](/engine/6000.6/script-reference/unity/jobs/ijob/execute.md) defines how to perform an asynchronous task. Use [IJobExtensions.ScheduleByRef](/engine/6000.6/script-reference/unity/jobs/ijobextensions/schedulebyref.md) to request asynchronous execution, or [IJobExtensions.RunByRef](/engine/6000.6/script-reference/unity/jobs/ijobextensions/runbyref.md) to execute the job immediately on the main thread.

Additional Resources: [IJob](/engine/6000.6/script-reference/unity/jobs/ijob.md).

## Examples

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

## Static Methods

| Method                                                                                      | Description                                                                        |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [EarlyJobInit](/engine/6000.6/script-reference/unity/jobs/ijobextensions/earlyjobinit.md)   | Gathers and caches reflection data for the internal job system's managed bindings. |
| [Run](/engine/6000.6/script-reference/unity/jobs/ijobextensions/run.md)                     | Performs the job's Execute method immediately on the same thread.                  |
| [RunByRef](/engine/6000.6/script-reference/unity/jobs/ijobextensions/runbyref.md)           | Performs the job's Execute method immediately on the main thread.                  |
| [Schedule](/engine/6000.6/script-reference/unity/jobs/ijobextensions/schedule.md)           | Schedules the job for execution on a worker thread.                                |
| [ScheduleByRef](/engine/6000.6/script-reference/unity/jobs/ijobextensions/schedulebyref.md) | Schedules the job for execution on a worker thread.                                |
