# IsInThread()

Determines whether the executing code is inside a cfthread or not.

**Introduced:** 5.0.0.0

```
IsInThread( );
```

**Returns:** boolean

*This function does not take any arguments.*

# Examples

```cfml
    request.inthread = false;
    writeOutput(isInThread());
    thread action="run" name="inThread" {
    request.inthread = isInThread();
    }
    sleep(1000);
    writeOutput(request.inthread)
```







# Categories

[Lucee Server related Tags, Functions and Guides](../../categories/server.md), [Threads](../../categories/thread.md)

# See Also

[<cfthread>](../tags/thread.md)