Mike Ash: “If you want to understand something as thoroughly as possible, you should build one yourself. That’s a little too much for a blog post, so rather than build a complete implementation of NSRunLoop, I’m going to take the second-best route and plan out the key features of its internals in pseudocode.”