# IsThreadInterrupted

Verifies if the current thread is interrupted or not.

You can also pass in a thread name to check if that thread is interrupted.

Example:

```
 if ( !IsThreadInterrupted() ) {
     // Do work
 }
 
```

## Method Signature

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

### Arguments

| Argument | Type     | Required | Description                                                      | Default |
| -------- | -------- | -------- | ---------------------------------------------------------------- | ------- |
| `name`   | `string` | `false`  | The name of the thread to check or empty for the current thread. |         |

## 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)
* [RunAsync](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/runasync)
* [ThreadInterrupt](https://boxlang.ortusbooks.com/boxlang-language/reference/built-in-functions/async/threadinterrupt)
* [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)
