Motivation:
Warnings are bad.
Modifications:
Changed things that still work in 4.0/4.1 but are warnings in 4.2 to
improved versions.
Result:
less warnings on the upcoming 4.2
Motivation:
We moved the priority queue implementation into the main `NIO` module
for performance reasons. I initially thought we didn't expose it to
external packages but we did (thanks @lukasa).
Modifications:
Bring back the `NIOPriorityQueue` module but deprecate it.
Result:
Speed & backwards compatibility :)
Motivation:
We triggered extra allocations for the generics on PriorityQueue/Heap.
They unfortunately can't be solved using `@_specialize` as the element
type is `ScheduledTask`.
Fortunately we never exposed those types externally so we can just
inline without breaking the public API.
Modifications:
Moved everything from the `NIOPriorityQueue` module into the `NIO`
module.
Result:
Less allocations, more happiness.
Motivation:
The new implementation doesn't convert lhs and rhs to arrays, thereby saving 2 allocations.
Modifications:
Changed the body of priority queue ==.
Result:
The comparison will be faster and use less memory.
Motivation:
We've found following these conventions in the standard library simplifies
the code significantly if you create a lot of generic types that conform
to the std lib protocols.
Modifications:
Change the placeholder T to Element and remove now-unnecessary typealias.
Switch the name of the iterator to just Iterator, and have it re-use
the outer type's Element placeholder. Remove now-unnecessary typealiases.
Add deprecated typealiases to make this a non-breaking change.
Result:
Should be a non-functional change. Explicit typing outside the PriorityQueue
type would need to change, but there wasn't any.
Motivation:
Sometimes we deviated from the style the Swift stdlib sets out for no
reason.
Modifications:
Fixed some stylistic deviations.
Result:
Looks more Swift-like.