Getting the Run Loop

When using an application built using the Application Kit, a run loop is created and run automatically. If you need to access this run loop, use the NSRunLoop class method currentRunLoop.

Additional run loops are created for each additional NSThread and also can be accessed by invoking currentRunLoop from each thread. These run loops do not have any input sources and are not running when the thread begins. You must add input sources to them and start the run loop yourself.