CFFileDescriptorCreateRunLoopSource(_:_:_:)
Creates a new runloop source for a given CFFileDescriptor.
Declaration
func CFFileDescriptorCreateRunLoopSource(_ allocator: CFAllocator!, _ f: CFFileDescriptor!, _ order: CFIndex) -> CFRunLoopSource!Parameters
- allocator:
The allocator to use to allocate memory for the new bag and its storage for values. Pass
NULLor kCFAllocatorDefault to use the current default allocator. - f:
A CFFileDescriptor.
- order:
The order for the new run loop (see Cfrunloopsourcecreate(_:_:_:)).
Return Value
A new runloop source for f, or NULL if there was a problem creating the object. Ownership follows the The Create Rule.
Discussion
The context for the new runloop (see CFRunLoopSourceCreate(_:_:_:)) is the same as the context passed in when the CFFileDescriptor was created (see CFFileDescriptorCreate(_:_:_:_:_:)).