Structure

DispatchQueue.Attributes

Attributes that define the behavior of a dispatch queue.

Declaration

struct Attributes

Topics

Attributes

static let concurrent: DispatchQueue.Attributes

The queue schedules tasks concurrently.

static let initiallyInactive: DispatchQueue.Attributes

The newly created queue is inactive.

Initializers

init()

Creates an empty option set.

init(arrayLiteral: DispatchQueue.Attributes...)

Creates a set containing the elements of the given array literal.

init<S>(S)

Creates a new set from a finite sequence of items.

Instance Properties

var isEmpty: Bool

A Boolean value that indicates whether the set has no elements.

Instance Methods

func contains(DispatchQueue.Attributes) -> Bool

Returns a Boolean value that indicates whether a given element is a member of the option set.

func formIntersection(DispatchQueue.Attributes)

Removes all elements of this option set that are not also present in the given set.

func formSymmetricDifference(DispatchQueue.Attributes)

Replaces this set with a new set containing all elements contained in either this set or the given set, but not in both.

func formUnion(DispatchQueue.Attributes)

Inserts the elements of another set into this option set.

func insert(DispatchQueue.Attributes) -> (inserted: Bool, memberAfterInsert: DispatchQueue.Attributes)

Adds the given element to the option set if it is not already a member.

func intersection(DispatchQueue.Attributes) -> DispatchQueue.Attributes

Returns a new option set with only the elements contained in both this set and the given set.

func isDisjoint(with: DispatchQueue.Attributes) -> Bool

Returns a Boolean value that indicates whether the set has no members in common with the given set.

func isStrictSubset(of: DispatchQueue.Attributes) -> Bool

Returns a Boolean value that indicates whether this set is a strict subset of the given set.

func isStrictSuperset(of: DispatchQueue.Attributes) -> Bool

Returns a Boolean value that indicates whether this set is a strict superset of the given set.

func isSubset(of: DispatchQueue.Attributes) -> Bool

Returns a Boolean value that indicates whether the set is a subset of another set.

func isSuperset(of: DispatchQueue.Attributes) -> Bool

Returns a Boolean value that indicates whether the set is a superset of the given set.

func remove(DispatchQueue.Attributes) -> DispatchQueue.Attributes?

Removes the given element and all elements subsumed by it.

func subtract(DispatchQueue.Attributes)

Removes the elements of the given set from this set.

func subtracting(DispatchQueue.Attributes) -> DispatchQueue.Attributes

Returns a new set containing the elements of this set that do not occur in the given set.

func symmetricDifference(DispatchQueue.Attributes) -> DispatchQueue.Attributes

Returns a new option set with the elements contained in this set or in the given set, but not in both.

func union(DispatchQueue.Attributes) -> DispatchQueue.Attributes

Returns a new option set of the elements contained in this set, in the given set, or in both.

Operator Functions

static func != (DispatchQueue.Attributes, DispatchQueue.Attributes) -> Bool

Returns a Boolean value indicating whether two values are not equal.

Relationships

Conforms To

See Also

Creating a Dispatch Queue

class var main: DispatchQueue

The dispatch queue associated with the main thread of the current process.

class func global(qos: DispatchQoS.QoSClass) -> DispatchQueue

Returns the global system queue with the specified quality-of-service class.

enum DispatchQoS.QoSClass

Quality-of-service classes that specify the priorities for executing tasks.

enum DispatchQueue.AutoreleaseFrequency

Constants indicating the frequency with which a dispatch queue autoreleases objects.

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.