swift-nio/Sources/_NIODataStructures
Cory Benfield d62c733653
Extract PriorityQueue to its own module. (#1932)
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.
2021-08-09 11:00:03 +01:00
..
Heap.swift Extract PriorityQueue to its own module. (#1932) 2021-08-09 11:00:03 +01:00
PriorityQueue.swift Extract PriorityQueue to its own module. (#1932) 2021-08-09 11:00:03 +01:00