Type Property

mainQueue

Returns the operation queue associated with the main thread.

Declaration

@property(class, readonly, strong) NSOperationQueue *mainQueue;

Return Value

The default operation queue bound to the main thread.

Discussion

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 NSRunLoopCommonModes constant. The value of the underlyingQueue property for the queue is the dispatch queue for the main thread; this property cannot be set to another value.

See Also

Accessing Specific Operation Queues

currentQueue

Returns the operation queue that launched the current operation.