# Enqueue

> Adds an element at the back of the queue.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections](/engine/6000.7/script-reference/unity/collections.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## Enqueue(T)

Adds an element at the back of the queue.

```csharp
public void Enqueue(T value)
```

### Parameters

**** (T): The value to be enqueued.

## Enqueue(T, int)

Adds an element at the back of the queue.

```csharp
public void Enqueue(T value, int threadIndexOverride)
```

### Parameters

**** (T): The value to be enqueued.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The thread index which must be set by a field from a job struct with the NativeSetThreadIndexAttribute attribute.
