Structure

DispatchWorkItemFlags

A set of behaviors for a work item, such as its quality-of-service class and whether to create a barrier or spawn a new detached thread.

Declaration

struct DispatchWorkItemFlags

Topics

Work Item Flags

static let assignCurrentContext: DispatchWorkItemFlags

Set the attributes of the work item to match the attributes of the current execution context.

static let barrier: DispatchWorkItemFlags

Cause the work item to act as a barrier block when submitted to a concurrent queue.

static let detached: DispatchWorkItemFlags

Disassociate the work item's attributes from the current execution context.

static let enforceQoS: DispatchWorkItemFlags

Prefer the quality-of-service class associated with the block.

static let inheritQoS: DispatchWorkItemFlags

Prefer the quality-of-service class associated with the current execution context.

static let noQoS: DispatchWorkItemFlags

Execute the work item without assigning a quality-of-service class.

Initializers

init()

Creates an empty option set.

init(arrayLiteral: DispatchWorkItemFlags...)

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(DispatchWorkItemFlags) -> Bool

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

func formIntersection(DispatchWorkItemFlags)

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

func formSymmetricDifference(DispatchWorkItemFlags)

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(DispatchWorkItemFlags)

Inserts the elements of another set into this option set.

func insert(DispatchWorkItemFlags) -> (inserted: Bool, memberAfterInsert: DispatchWorkItemFlags)

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

func intersection(DispatchWorkItemFlags) -> DispatchWorkItemFlags

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

func isDisjoint(with: DispatchWorkItemFlags) -> Bool

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

func isStrictSubset(of: DispatchWorkItemFlags) -> Bool

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

func isStrictSuperset(of: DispatchWorkItemFlags) -> Bool

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

func isSubset(of: DispatchWorkItemFlags) -> Bool

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

func isSuperset(of: DispatchWorkItemFlags) -> Bool

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

func remove(DispatchWorkItemFlags) -> DispatchWorkItemFlags?

Removes the given element and all elements subsumed by it.

func subtract(DispatchWorkItemFlags)

Removes the elements of the given set from this set.

func subtracting(DispatchWorkItemFlags) -> DispatchWorkItemFlags

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

func symmetricDifference(DispatchWorkItemFlags) -> DispatchWorkItemFlags

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

func union(DispatchWorkItemFlags) -> DispatchWorkItemFlags

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

Operator Functions

static func != (DispatchWorkItemFlags, DispatchWorkItemFlags) -> Bool

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

Relationships

See Also

Creating a Work Item

init(qos: DispatchQoS, flags: DispatchWorkItemFlags, block: () -> Void)

Creates a new dispatch work item from an existing block and assigns it the specified quality-of-service class.