mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Motivation: I'd like to move EmbeddedChannel and friends out of the main NIO repository and into their own module. Unfortunately, EmbeddedChannel shares the PriorityQueue implementation we wrote with the various POSIX channels. To avoid duplicating the code, we should pull it out to its own module. However, we've never wanted to commit to the API of this data structure, and the same is true now. To that end, I'm pulling it into an underscored module that is not a product of the package. We could have used the `@_spi` annotation here but honestly I'm a bit nervous about doing that at the low-level of NIO itself, as if the Swift team does change the spelling of it at any point in the future we'll be in real trouble. This way works almost as well, and makes our intent a lot clearer. Modifications: - Extracted Heap and PriorityQueue to a new module. - Made everything @inlinable to do our best to make performance acceptable. Result: We can re-use PriorityQueue.