Returns the operation queue associated with the main thread.
- iOS 4.0+
- macOS 10.6+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The default operation queue bound to the main thread.
The returned queue executes one operation at a time on the app’s main thread. The execution of operations on the main thread is interleaved with the other tasks that must execute on the main thread, such as the servicing of events and the updating of an app’s user interface. The queue executes those operations in the run loop common modes, as represented by the
NSRun constant. The value of the
underlying property for the queue is the dispatch queue for the main thread; this property cannot be set to another value.