Type Property

main

Returns the operation queue associated with the main thread.

Declaration

class var main: OperationQueue { get }

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 common 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

class var current: OperationQueue?

Returns the operation queue that launched the current operation.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software