> ## Documentation Index
> Fetch the complete documentation index at: https://docsuncv2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# isourthread

Checks whether the specified thread belongs to the executor's context.

```luau theme={null}
isourthread(thread: thread?): boolean
```

## Parameters

| Parameter | Type     | Description                                                       |
| --------- | -------- | ----------------------------------------------------------------- |
| `thread`  | `thread` | *(Optional)* The thread to check. Defaults to the current thread. |

## Returns

`boolean` - `true` if the thread belongs to the executor, `false` otherwise.

## Example

<CodeGroup>
  ```luau Example 1 theme={null}
  print(isourthread()) -- true
  ```

  ```luau Example 2 theme={null}
  local t = coroutine.create(function() end)
  print(isourthread(t)) -- true
  ```
</CodeGroup>

<Tip>
  Helps distinguish executor-owned threads from native game engine threads.
</Tip>
