pthreads getting you down? libdispatch, aka Grand Central Dispatch (GCD) is Apple's high-performance event-handling library, introduced in OS X Snow Leopard. It provides asynchronous task queues, monitoring of file descriptor read and write-ability, asynchronous I/O (for sockets and regular files), readers-writer locks, parallel for-loops, sane signal handling, periodic timers, semaphores and more. You'll want to read over Apple's API reference. I've added the ability to integrate libdispatch's main queue with third-party run-loops, e.g. GLib's GMainLoop. Call dispatch_get_main_queue_handle_np() to get a file descriptor your run-loop can monitor for reading; when it becomes readable call dispatch_main_queue_drain_np() to execute the pending tasks.