DispatchSource
class DispatchSource
class DispatchSource
import Dispatch
class DispatchObject
protocol DispatchSourceProtocol
protocol DispatchSourceRead : DispatchSourceProtocol
protocol DispatchSourceSignal : DispatchSourceProtocol
protocol DispatchSourceTimer : DispatchSourceProtocol
protocol DispatchSourceUserDataAdd : DispatchSourceProtocol
protocol DispatchSourceUserDataOr : DispatchSourceProtocol
protocol DispatchSourceUserDataReplace : DispatchSourceProtocol
protocol DispatchSourceWrite : DispatchSourceProtocol
protocol Sendable
class func makeReadSource(fileDescriptor: Int32, queue: DispatchQueue? = nil) -> any DispatchSourceRead
class func makeSignalSource(signal: Int32, queue: DispatchQueue? = nil) -> any DispatchSourceSignal
class func makeTimerSource(flags: DispatchSource.TimerFlags = [], queue: DispatchQueue? = nil) -> any DispatchSourceTimer
class func makeUserDataAddSource(queue: DispatchQueue? = nil) -> any DispatchSourceUserDataAdd
class func makeUserDataOrSource(queue: DispatchQueue? = nil) -> any DispatchSourceUserDataOr
class func makeUserDataReplaceSource(queue: DispatchQueue? = nil) -> any DispatchSourceUserDataReplace
class func makeWriteSource(fileDescriptor: Int32, queue: DispatchQueue? = nil) -> any DispatchSourceWrite
struct FileSystemEvent
struct TimerFlags
var data: UInt { get }
var handle: UInt { get }
var isCancelled: Bool { get }
var mask: UInt { get }
func add(data: UInt)
Merges data into a dispatch source of type DISPATCH_SOURCE_TYPE_DATA_ADD
and submits its event handler block to its target queue.
func cancel()
func or(data: UInt)
Merges data into a dispatch source of type DISPATCH_SOURCE_TYPE_DATA_OR
and submits its event handler block to its target queue.
func replace(data: UInt)
Merges data into a dispatch source of type DISPATCH_SOURCE_TYPE_DATA_REPLACE
and submits its event handler block to its target queue.
func schedule(deadline: DispatchTime, repeating interval: DispatchTimeInterval = .never, leeway: DispatchTimeInterval = .nanoseconds(0))
Sets the deadline, repeat interval and leeway for a timer event.
func schedule(deadline: DispatchTime, repeating interval: Double, leeway: DispatchTimeInterval = .nanoseconds(0))
Sets the deadline, repeat interval and leeway for a timer event.
func schedule(wallDeadline: DispatchWallTime, repeating interval: DispatchTimeInterval = .never, leeway: DispatchTimeInterval = .nanoseconds(0))
Sets the deadline, repeat interval and leeway for a timer event.
func schedule(wallDeadline: DispatchWallTime, repeating interval: Double, leeway: DispatchTimeInterval = .nanoseconds(0))
Sets the deadline, repeat interval and leeway for a timer event that fires at least once.
func setCancelHandler(handler: DispatchWorkItem)
func setCancelHandler(qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], handler: DispatchSourceHandler?)
func setEventHandler(handler: DispatchWorkItem)
func setEventHandler(qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], handler: DispatchSourceHandler?)
func setRegistrationHandler(handler: DispatchWorkItem)
func setRegistrationHandler(qos: DispatchQoS = .unspecified, flags: DispatchWorkItemFlags = [], handler: DispatchSourceHandler?)
func scheduleOneshot(deadline: DispatchTime, leeway: DispatchTimeInterval = .nanoseconds(0))
Sets the deadline and leeway for a timer event that fires once.
func scheduleOneshot(wallDeadline: DispatchWallTime, leeway: DispatchTimeInterval = .nanoseconds(0))
Sets the deadline and leeway for a timer event that fires once.
func scheduleRepeating(deadline: DispatchTime, interval: DispatchTimeInterval, leeway: DispatchTimeInterval = .nanoseconds(0))
Sets the deadline, interval and leeway for a timer event that fires at least once.
func scheduleRepeating(deadline: DispatchTime, interval: Double, leeway: DispatchTimeInterval = .nanoseconds(0))
Sets the deadline, interval and leeway for a timer event that fires at least once.
func scheduleRepeating(wallDeadline: DispatchWallTime, interval: DispatchTimeInterval, leeway: DispatchTimeInterval = .nanoseconds(0))
Sets the deadline, interval and leeway for a timer event that fires at least once.
func scheduleRepeating(wallDeadline: DispatchWallTime, interval: Double, leeway: DispatchTimeInterval = .nanoseconds(0))
Sets the deadline, interval and leeway for a timer event that fires at least once.