Returns a Boolean value that indicates whether the run loop is waiting for an event.


func CFRunLoopIsWaiting(_ rl: CFRunLoop!) -> Bool



The run loop to examine.

Return Value

true if rl has no events to process and is blocking, waiting for a source or timer to become ready to fire; false if rl either is not running or is currently processing a source, timer, or observer.


This function is useful only to test the state of another thread’s run loop. When called with the current thread’s run loop, this function always returns false.

See Also

Starting and Stopping a Run Loop

func CFRunLoopRun()

Runs the current thread’s CFRunLoop object in its default mode indefinitely.

func CFRunLoopRunInMode(CFRunLoopMode!, CFTimeInterval, Bool) -> CFRunLoopRunResult

Runs the current thread’s CFRunLoop object in a particular mode.

func CFRunLoopWakeUp(CFRunLoop!)

Wakes a waiting CFRunLoop object.

func CFRunLoopStop(CFRunLoop!)

Forces a CFRunLoop object to stop running.

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