[**delphirtl**](../README.md) • **Docs**

***

[delphirtl](../globals.md) / runInThread

# Function: runInThread()

> **runInThread**\<`T`\>(`fn`): `Promise`\<`T`\>

Runs a function in a thread

## Type Parameters

• **T**

## Parameters

• **fn**

The function to run in a thread

## Returns

`Promise`\<`T`\>

## Defined in

[src/threadutils.ts:11](https://github.com/chuacw/delphirtl/blob/b2d86277a5251f0037cf01044224c3e29dc4c6be/src/threadutils.ts#L11)
