Structure

DispatchSource.ProcessEvent

A process event.

Topics

Initializers

init()

Creates an empty option set.

init<S>(S)

Creates a new set from a finite sequence of items.

init(arrayLiteral: DispatchSource.ProcessEvent...)

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

Instance Properties

var isEmpty: Bool

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

Instance Methods

func contains(DispatchSource.ProcessEvent)

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

func formIntersection(DispatchSource.ProcessEvent)

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

func formSymmetricDifference(DispatchSource.ProcessEvent)

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(DispatchSource.ProcessEvent)

Inserts the elements of another set into this option set.

func insert(DispatchSource.ProcessEvent)

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

func intersection(DispatchSource.ProcessEvent)

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

func isDisjoint(with: DispatchSource.ProcessEvent)

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

func isStrictSubset(of: DispatchSource.ProcessEvent)

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

func isStrictSuperset(of: DispatchSource.ProcessEvent)

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

func isSubset(of: DispatchSource.ProcessEvent)

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

func isSuperset(of: DispatchSource.ProcessEvent)

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

func remove(DispatchSource.ProcessEvent)

Removes the given element and all elements subsumed by it.

func subtract(DispatchSource.ProcessEvent)

Removes the elements of the given set from this set.

func subtracting(DispatchSource.ProcessEvent)

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

func symmetricDifference(DispatchSource.ProcessEvent)

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

func union(DispatchSource.ProcessEvent)

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

func update(with: DispatchSource.ProcessEvent)

Inserts the given element into the set.

Operator Functions

static func !=(DispatchSource.ProcessEvent, DispatchSource.ProcessEvent)

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

Relationships

See Also

Managing Dispatch Sources

class DispatchSource

DispatchSource provides an interface for monitoring low-level system objects such as Mach ports, Unix descriptors, Unix signals, and VFS nodes for activity and submitting event handlers to dispatch queues for asynchronous processing when such activity occurs.

protocol DispatchSourceProtocol

Defines a common set of properties and methods that are shared with all dispatch source types.

protocol DispatchSourceFileSystemObject

A dispatch source that monitors a file descriptor for events defined by DispatchSource.FileSystemEvent. The handle is a file descriptor (Int32).

protocol DispatchSourceMachSend

A dispatch source that monitors a Mach port for dead name notifications, indicating that a send right no longer has any corresponding receive right. The handle is a Mach port with a send or send-once right (mach_port_t).

protocol DispatchSourceMachReceive

A dispatch source that monitors a Mach port for pending messages. The handle is a Mach port with a receive right (mach_port_t).

protocol DispatchSourceMemoryPressure

A dispatch source that monitors the system for changes in memory pressure condition.

protocol DispatchSourceProcess

A dispatch source that monitors an external process for events defined by DispatchSource.ProcessEvent. The handle is a process identifier (pid_t).

protocol DispatchSourceTimer

A dispatch source that submits the event handler block based on a timer.

protocol DispatchSourceUserDataAdd

A dispatch source that coalesces data obtained via calls to calls to the add(data:) method.

protocol DispatchSourceUserDataOr

A dispatch source that coalesces data obtained via calls to the or(data:) method.

protocol DispatchSourceSignal

A dispatch source that monitors the current process for Unix signals.