kentonv/capnproto — pull request #91 by jjwchoy (2014-05-28 16:54:39+00:00)
Title: Added eventloop integration with CFRunLoop (OSX/iOS)

This is mostly copied from node-capnproto and async-unix. This commit enables integration with Cocoa's event loop (CFRunLoop).

Notes:
- I haven't committed any tests yet (however I have tried the AsyncIo::SimpleNetwork test with it and it works both when using `wait`, and running CFRunLoop normally)
- I haven't added modified the makefiles (requires `-framework CoreFoundation` to be added to LDFLAGS for libkj-async)
- I've had to add a temporary `AsyncCocoaIoContext` struct as `AsyncIoContext` currently has a unixEventPort field

Is this something you would merge into kj? It would be useful for anyone that wants to integrate kj/capnproto into an OSX/iOS application, and for an Objective-C wrapper of capnproto.