Files
swift-nio/Sources/NIO
40a3794de3 GetaddrinfoResolver: don't block EventLoops (#1887)
Motivation:

GetaddrinfoResolver is blocking the calling thread for anything that
uses a `ClientBootstrap`. Often, `ClientBootstrap`s are used on
EventLoops which obviously creates a problem because you mustn't block
EventLoops.

Modifications:

- Offload the `getaddrinfo` call to a `DispatchQueue`.
- Keep the semantics:
  * only do one concurrent `getaddrinfo` call per SelectableEventLoop
  * prevent thread explosion on `SelectableEventLoop`

Result:

Less EL blocking.

Co-authored-by: George Barnett <gbarnett@apple.com>
Co-authored-by: Cory Benfield <lukasa@apple.com>
2021-07-21 10:22:18 +01:00
..
2021-06-09 15:57:47 +01:00