Contents

IONotificationPortGetRunLoopSource(_:)

Returns a CFRunLoopSource to be used to listen for notifications.

Declaration

func IONotificationPortGetRunLoopSource(_ notify: IONotificationPortRef!) -> Unmanaged<CFRunLoopSource>!

Parameters

  • notify:

    The notification object.

Return Value

A CFRunLoopSourceRef for the notification object.

Discussion

A notification object may deliver notifications to a CFRunLoop by adding the run loop source returned by this function to the run loop.

The caller should not release this CFRunLoopSource. Just call IONotificationPortDestroy(_:) to dispose of the IONotificationPortRef and the CFRunLoopSource when done.

See Also

Miscellaneous