Skip to content
Commitwise
Menu

Hang

A moment when an app's main thread is blocked long enough that the app stops responding to the user, typically 250 ms or more.

Definition

Common causes are synchronous disk or network access, heavy computation or image decoding on the main thread, and lock contention. On iOS, the Hangs instrument, Xcode's Organizer and MetricKit report them; on Android, the equivalent is jank for short stalls and an ANR when the main thread is blocked for about five seconds. Async code running on the main actor still blocks it between suspension points.

In practice

Rendering a PDF synchronously in a @MainActor method freezes the share button for a second.

Related terms

Esc

Type to search the whole site.