# Microthread.State

Kind: Enum · Namespace: Sansar.Microthreading · Assembly: Sansar.Script.dll · Script API 47.10.0

<div class="api-meta">
<span class="api-kind api-kind-enum" data-pagefind-filter="kind:Enum">Enum</span>
<span data-pagefind-filter="namespace:Sansar.Microthreading">Namespace <a href="/scripting/api/sansar.microthreading"><code>Sansar.Microthreading</code></a></span>
</div>
<p class="api-flag api-stripped-only">This type is documented in the client, but it is not in the reference assemblies that scripts compile against. Scripts may not be able to use it.</p>

<span id="T:Sansar.Microthreading.Microthread.State"></span>

Represents possible states for a Microthread

```csharp
protected enum Microthread.State
```

## Values

| Value | Description |
|---|---|
| <span id="idle"></span><span id="F:Sansar.Microthreading.Microthread.State.Idle"></span>`Idle` | The thread id active but waiting on events. |
| <span id="running"></span><span id="F:Sansar.Microthreading.Microthread.State.Running"></span>`Running` | The thread is in a running state. |
| <span id="threaderror"></span><span id="F:Sansar.Microthreading.Microthread.State.ThreadError"></span>`ThreadError` | An unhandled exception or other non-recoverable error has occurred and the thread will not be run. |

## Used in examples

- [ScriptLibrary/Quest/QuestVisibility.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Quest/QuestVisibility.cs)
- [ScriptLibrary/Scene/KeyframedMotion.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/KeyframedMotion.cs)
- [ScriptLibrary/Scene/Mover.cs](https://github.com/Wookey-Technologies/sansar-script-starter/blob/66af8b516b701088d043e4615acfcf5779356604/examples/official/ScriptLibrary/Scene/Mover.cs)

<p class="api-generated" data-pagefind-ignore>Generated from the Sansar 47.10.0 client ScriptApi snapshot.</p>