August 2011
Intermediate to advanced
552 pages
23h 48m
English
You can hook more stuff into the run loop, such as an observer. A run loop observer has its callback function invoked at a number of well defined places, shown Figure 15.6. These are the observation points:
When the run loop is entered
Before timers are fired
After timers are fired
Before sources (like the CFSocket) are checked
Before the run loop waits for activity (blocking until it can do something)
After it wakes up
When the run loop exits
Figure 15.6 Run loop observation points

Here is a function that will register an observer:
void addRunLoopObserver () { ...Read now
Unlock full access