---
title: main
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/runloop/main
---

# main

Returns the run loop of the main thread.

## Declaration

```swift
class var main: RunLoop { get }
```

## Return Value

Return Value An object representing the main thread’s run loop.

## See Also

### Accessing Run Loops and Modes

- [current](foundation/runloop/current.md)
- [currentMode](foundation/runloop/currentmode.md)
- [limitDate(forMode:)](foundation/runloop/limitdate(formode:).md)
- [getCFRunLoop()](foundation/runloop/getcfrunloop().md)
- [RunLoop.Mode](foundation/runloop/mode.md)
