---
title: requiresMainThread
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiprintformatter/requiresmainthread
---

# requiresMainThread

A Boolean value that determines whether the system executes the print formatter’s rendering operations on the main thread.

## Declaration

```swift
var requiresMainThread: Bool { get }
```

## Discussion

Discussion The default value is true, which requires the printing system to execute rendering operations, like drawing and page-count calculation, on the main thread. Override this property to return false if you want the system to execute operations like draw(in:forPageAt:) and pageCount on a background thread.
