vapor / async-kit

Sugary extensions for the SwiftNIO library
MIT License
71 stars 25 forks source link

elg + el connection pools #42

Closed tanner0101 closed 4 years ago

tanner0101 commented 4 years ago

This PR breaks ConnectionPool's functionality out into two pools:

EventLoopGroupConnectionPool is thread-safe and creates one EventLoopConnectionPool per event loop on a group. EventLoopConnectionPool is not thread-safe and is expected to be used only from its event loop.

By separating this functionality out into two pools, each implementation is simpler and easier to reason about while allowing for users to choose which behavior they would like.