# Enqueue

> This function can be used in a thread to enqueue an action that will be executed later in the main thread.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Search](/engine/6000.6/script-reference/unityeditor/search.md)
* **Assembly:** UnityEditor

## Enqueue(Action)

This function can be used in a thread to enqueue an action that will be executed later in the main thread.

```csharp
public static void Enqueue(Action action)
```

### Parameters

**** (\[Action]\(https\://learn.microsoft.com/dotnet/api/system.action)): Action to be executed in the main thread later.

## Enqueue(Action, double)

This function can be used in a thread to enqueue an action that will be executed later in the main thread.

```csharp
public static void Enqueue(Action action, double delayInSeconds)
```

### Parameters

**** (\[Action]\(https\://learn.microsoft.com/dotnet/api/system.action)): Action to be executed in the main thread later.**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)):&#x20;
