New async APIs (former AsyncChannel SPI)
With this release we are stabilizing the AsyncChannel SPI and promote it to API. The following changes have been made to finalize the new APIs.
General and performance changes
- Improve performance of
NIOAsyncChannel(#2539) - Remove SPI from
NIOAsyncChanneland new bootstrap methods (#2548) - Add docs for the async NIO APIs (#2549)
- Update the concurrency documentation (#2529)
- Add
NIOAsyncChannelbenchmark (#2536) - Add support for async VSock bootstrap methods (#2561)
Typed HTTP upgrading
- Introduce new typed
HTTPServerUpgraderandWebSocketServerUpgrader(#2517) - Introduce new typed
HTTPClientUpgraderandWebSocketClientUpgrader(#2526)
Breaking
The following were breaking changes to the SPI.
- 🚨Remove
ProtocolNegotiationHandlerprotocol (#2519) - 🚨Align back pressure naming (#2527)
- 🚨Make
NIOAsyncChannela struct (#2528) - 🚨Remove
NIOProtocolNegotiationResult(#2554)
SemVer Minor
- Add jitter support to recurring tasks (#2542, patch credit to @LorenzoFritzsch)
- Bump minimum Swift version to 5.7 (#2524)
- Add customization point for scheduling
ExecutorJobs onEventLoops (#2538) - Support disabling body aggregation in
NIOHTTP1TestServer(#2563) - Add support for unidirectional
NIOPipeBootstrap(#2560)
SemVer Patch
- Fix failed c++ compile of CNIOAtomics.h (#2518, patch credit to @saintstack)
- Fix
CNIOSHA1.hto support C++ interoperability (#2523, patch credit to @yaglo) - Fix overflow in
TimeAmount(#2543, patch credit to @LorenzoFritzsch) - Avoid terminating when a precondition is not met in
HTTPServerPipelineHandler(#2550) - Fix Sendable warning in
NIOPipeBoostrap(#2530) - Tolerate empty HTTP response body parts (#2531)
- Call
NIOAsyncWriterSinkDelegateoutside of the lock (#2547) - Fix test availability for tests (#2533)
- Fix
Sendableconformance forLock(#2556) - Remove continuation resumption inside locks (#2558)
- NonBlockingFileIO: tolerate chunk handlers from other
EventLoops (#2562) - Mark retroactive conformances appropriately. (#2569)
Other Changes
- Fix missing whitespace in
README.md(#2535) - Fix flakiness in testDelayedUpgradeBehaviour (#2557)
- Add autogenerated files from VSCode to .gitignore (#2567, patch credit to @adam-fowler)
- Mention file length in bytes in
readFileSizeexplicitly (#2572) - Adopt
package-benchmark(#2534) - Fix thread-safety issues in
TCPThroughputBenchmark(#2537) - perf tests: reset ByteBuffer indices after every iteration (#2544)
measureRunTimeuseDispatchTime(#2545)- Fix flaky
testRemovesAllHTTPRelatedHandlersAfterUpgradetest (#2552) waitForUpgraderToBeRemovedavailability guard (#2559)