mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation: Currently all backends are platform-conditional in the `Selector` code, making it harder to read and difficult to extend for future new backend implementations. By splitting the `Selector` into a generic part and per-backend platform implementation it is easier to add additional backends in the future. Modifications: Split Selector into `SelectorGeneric`, `SelectorEpoll` and `SelectorKqueue`. Add a _SelectorBackendProtocol that should be implemented by actual backends. Fixed tests. Result: - Easier to read code - Makes it easier to add new backends Co-authored-by: Cory Benfield <lukasa@apple.com> Co-authored-by: Johannes Weiss <johannesweiss@apple.com>