# RunByRef<T>(ref T, int)

> Performs the job's Execute method immediately on the main thread by reference.

## Definition

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

## RunByRef\<T>(T, int)

```csharp
public static void RunByRef<T>(this ref T jobData, int arrayLength) where T : struct, IJobFor
```

### Parameters

**** (T): The job and data to execute.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The number of iterations to execute the for loop over.

### Remarks

Additional Resources: [IJobFor](/engine/6000.0/script-reference/unity/jobs/ijobfor.md).
