> ## Documentation Index
> Fetch the complete documentation index at: https://docs.basset.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# mainThreadHang

> How long the main run loop went without returning to idle

Watches the main run loop directly. A reading each time a hang starts or
resolves, sharing a `faultId` with the thread snapshot it triggers.

| | |
| - | - |
| [Delivery](/instruments/metadata) | stream, onChange |
| Mechanism | runLoopObserver |
| [Requires](/instruments/metadata) | iOS 17+, basset 0.1.1+ |

**Config** (`concurrency.mainThreadHang:key=value,...`)

* `thresholdMs` (int 100...60000): How long the main thread must stay busy before this reports. Default 2000.

Real output from `basset request get`, captured against a running app:

```
CAPTURED                  ELAPSED  INSTRUMENT

launch 12527301282799096824
2026-08-23T14:26:24.864Z  +0.0s    concurrency.mainThreadHang(mainThread)
├─ hangNanoseconds   2130051708
├─ hangResolved      false
├─ runLoopTurnCount  4
└─ faultId           1
2026-08-23T14:26:26.069Z  +1.2s    concurrency.mainThreadHang(mainThread)
├─ hangNanoseconds   3231712250
├─ hangResolved      true
├─ runLoopTurnCount  4
└─ faultId           1
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.