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

# main

Returns the NSThread object representing the main thread.

## Declaration

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

## Return Value

Return Value The NSThread object representing the main thread.

## See Also

### Working with the Main Thread

- [isMainThread](foundation/thread/ismainthread-swift.type.property.md)
- [isMainThread](foundation/thread/ismainthread-swift.property.md)
