# ThreadInterrupt

Interrupt the specific thread by name or all threads managed by the thread manager.

Example:

```
 ThreadInterrupt( "myThread" );
 
```

This will interrupt the thread with the name "myThread".

Example:

```

 ThreadInterrupt();
 
```

This will interrupt all threads managed by the thread manager.

## Method Signature

```
ThreadInterrupt(name=[string])
```

### Arguments

| Argument | Type     | Required | Description                                                                   | Default |
| -------- | -------- | -------- | ----------------------------------------------------------------------------- | ------- |
| `name`   | `string` | `false`  | The name of the thread to interrupt. If not passed, we interrupt ALL threads. |         |

## Examples

## Related

* [AsyncAll](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/asyncall)
* [AsyncAllApply](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/asyncallapply)
* [AsyncAny](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/asyncany)
* [AsyncRun](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/asyncrun)
* [ExecutorDelete](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/executordelete)
* [ExecutorGet](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/executorget)
* [ExecutorHas](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/executorhas)
* [ExecutorList](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/executorlist)
* [ExecutorNew](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/executornew)
* [ExecutorShutdown](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/executorshutdown)
* [ExecutorStatus](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/executorstatus)
* [FutureNew](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/futurenew)
* [IsInThread](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/isinthread)
* [isThreadAlive](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/isthreadalive)
* [IsThreadInterrupted](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/isthreadinterrupted)
* [RunAsync](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/runasync)
* [ThreadJoin](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/threadjoin)
* [ThreadNew](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/threadnew)
* [ThreadTerminate](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/threadterminate)
