relayrides/pushy — pull request #18 by jchambers (2013-11-12 21:05:27+00:00)
Title: Use a shared event loop group (fixes #13)

This makes all `ApnsClientThread` and `FeedbackServiceClient` instances share single `NioEventLoopGroup` to cut down on the number of threads required. In the future, we could probably make `ApnsClientThreads` into `ApnsConnections` that don't require a dedicated thread, but I'll defer that for now. This covers #13.

Part of this change defers creation of threads and other expensive resources until the `PushManager` is started (instead of just getting constructed); I don't think that should cause any problems, but I'd appreciate a second set of eyes if any of you @relayrides/engineering folks get a minute.