O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

16kqueue and FSEvents

Several of the technologies you have seen so far date back to Unix’s earlier days. Some of the APIs are awkward and difficult to use correctly, such as signal handling, and some are awkward and do not scale well, such as select() and poll().

In 2000, the FreeBSD project created Kernel Queues, abbreviated as kqueues, to address the shortcomings in the older APIs. Apple adopted kqueues in Mac OS X 10.3 and extended them in 10.6. kqueues are a unified notification mechanism used by the kernel that can inform your program about interesting events.

Inside the kernel are a number of filters, as shown in Figure 16.1. As the kernel does its work, it tells the filters what’s going on. There is a filter for process handling, another ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required