Constants indicating the frequency with which a dispatch queue autoreleases objects.
SDKs
- iOS 8.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Xcode 8.0+
Framework
- Dispatch
Declaration
enum AutoreleaseFrequency
Constants indicating the frequency with which a dispatch queue autoreleases objects.
SDKs
Framework
enum AutoreleaseFrequency
case inherit
The queue inherits its autorelease frequency from its target queue.
case work Item
The queue configures an autorelease pool before the execution of a block, and releases the objects in that pool after the block finishes executing.
case never
The queue does not set up an autorelease pool around executed blocks.
static func != (Dispatch Queue .Autorelease Frequency, Dispatch Queue .Autorelease Frequency) -> Bool
Returns a Boolean value indicating whether two values are not equal.
class var main: Dispatch Queue
The dispatch queue associated with the main thread of the current process.
class func global(qos: Dispatch Qo S .Qo SClass) -> Dispatch Queue
Returns the global system queue with the specified quality-of-service class.
init(label: String, qos: Dispatch Qo S, attributes: Dispatch Queue .Attributes, autorelease Frequency: Dispatch Queue .Autorelease Frequency, target: Dispatch Queue?)
Creates a new dispatch queue to which you can submit blocks.
enum Dispatch Qo S .Qo SClass
Quality-of-service classes that specify the priorities for executing tasks.
struct Dispatch Queue .Attributes
Attributes that define the behavior of a dispatch queue.
class OS _dispatch _queue _main
A system-provided dispatch queue that schedules tasks for serial execution on the app's main thread.
class OS _dispatch _queue _global
A system-provided dispatch queue that schedules tasks for concurrent execution.
class OS _dispatch _queue _serial
A custom dispatch queue that schedules tasks for serial execution on an arbitrary thread.
class OS _dispatch _queue _concurrent
A custom dispatch queue that schedules tasks for concurrent execution.
typealias dispatch _queue _main _t
A dispatch queue that is bound to the app's main thread and executes tasks serially on that thread.
typealias dispatch _queue _global _t
A dispatch queue that executes tasks concurrently using threads from the global thread pool.
typealias dispatch _queue _serial _t
A dispatch queue that executes tasks serially in first-in, first-out (FIFO) order.
typealias dispatch _queue _concurrent _t
A dispatch queue that executes tasks concurrently and in any order, respecting any barriers that may be in place.