# IsInThread

Verifies if the calling execution code is running in a thread or not.

## Method Signature

```
IsInThread()
```

### Arguments

This function does not accept any arguments

## Examples

### isinthread Example

Check if the code is running inside a bx:thread.

[Run Example](https://try.boxlang.io/?code=eJwrSi0sTS0u0fP0C%2FEIcnV0UbBVSEvMKU615iovyixJ9S8tKSgt0VDILPbMC8koSk1M0dBU0LTmSqqwKgFzFRKTSzLz82yVikrzlBTyEnNTbZUyoUqVFKq5OIswLUA2zJqrlqs4JzW1QEPB0MDAAGQ2isUY2oEKACLTOhQ%3D)

```java
request.INTHREAD = false;
writeOutput( isInThread() );
bx:thread action="run" name="inThread" {
	request.INTHREAD = isInThread();
}
sleep( 1000 );
writeOutput( request.INTHREAD );

```

Result: falsetrue

### Additional 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)
* [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)
* [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)
