Kqueue
public struct Kqueue: FileDescriptor
Darwin only. Kqueue implements the Darwin kqueue mechanism. See kqueue(2).
-
The file descriptor of this kqueue instance.
Declaration
Swift
public let fileDescriptor: Int32
-
Creates a kqueue instance.
Declaration
Swift
public init() throws
-
Polls for and returns available events in
events
. Events inchanges
are first added, updated or removed as requested by the event’s flags. The call blocks if no events are immediately available. If timeout is set, unblocks after this delay if no events are available. Returns the number of events available. No more thanevents.count
events will be returned. -
Releases the resources for this file descriptor.
Declaration
Swift
public func close() throws