DispatchSource
An object that coordinates the processing of specific low-level system events, such as file-system events, timers, and UNIX signals.
Declaration
class DispatchSourceOverview
Use the methods of this class to construct new dispatch sources of the appropriate types.
Topics
Managing Common Dispatch Source Properties
Creating a Timer Source
Creating a File System Source
makeReadSource(fileDescriptor:queue:)makeWriteSource(fileDescriptor:queue:)makeFileSystemObjectSource(fileDescriptor:eventMask:queue:)DispatchSourceReadDispatchSourceWriteDispatchSourceFileSystemObjectDispatchSource.FileSystemEvent
Creating a Process Source
Creating a Memory Pressure Source
makeMemoryPressureSource(eventMask:queue:)DispatchSourceMemoryPressureDispatchSource.MemoryPressureEvent
Creating a Signal Source
Creating a Mach Port Source
makeMachReceiveSource(port:queue:)makeMachSendSource(port:eventMask:queue:)DispatchSourceMachReceiveDispatchSourceMachSendDispatchSource.MachSendEvent