mirror of
https://github.com/apple/swift-nio
synced 2026-11-25 04:47:49 +00:00
Motivation: Previously `FileRegion` was a special snow flake, a bit like `ByteBuffer` but also totally different. That caused surprise and made `PendingWritesManager` even harder. It was also used to manage the lifetime of a file descriptor but only sort of. Modifications: We now have a `FileHandle` which is a one-to-one mapping with a file descriptor and its lifetime must be managed appropriately. Result: hopefully less bugs and fd leaks.