Schedules a CFHost on a run loop.


func CFHostScheduleWithRunLoop(_ theHost: CFHost, _ runLoop: CFRunLoop, _ runLoopMode: CFString)



The host to be schedule on a run loop. This value must not be NULL.


The run loop on which to schedule theHost. This value must not be NULL.


The mode on which to schedule theHost. This value must not be NULL.


Schedules theHost on a run loop, which causes resolutions of the host to be performed asynchronously. The caller is responsible for ensuring that at least one of the run loops on which the host is scheduled is being run.

Special Considerations

This function is thread safe.

See Also


class CFHost

An opaque reference representing an CFHost object.

enum CFHostInfoType

Values indicating the type of data that is to be resolved or the type of data that was resolved.

struct CFHostClientContext

A structure containing user-defined data and callbacks for CFHost objects.

func CFHostCreateWithAddress(CFAllocator?, CFData) -> Unmanaged<CFHost>

Uses an address to create an instance of a host object.

func CFHostCreateWithName(CFAllocator?, CFString) -> Unmanaged<CFHost>

Uses a name to create an instance of a host object.

func CFHostGetTypeID() -> CFTypeID

Gets the Core Foundation type identifier for the CFHost opaque type.

func CFHostSetClient(CFHost, CFHostClientCallBack?, UnsafeMutablePointer<CFHostClientContext>?) -> Bool

Associates a client context and a callback function with a CFHost object or disassociates a client context and callback function that were previously set.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software