Tags: swift-server/async-http-client
Tags
Don't hold a lock over a continuation in test helpers (#872) Motivation: The various 'withMumbleContinuation' APIs are supposed to be invoked synchronously with the caller. This assumption allows a lock to be acquired before the call and released from the body of the 'withMumbleContinuation' after e.g. storing the continuation. However this isn't the case and the job may be re-enqueued on the executor meaning that this is pattern is vulnerable to deadlocks. Modifications: - Rework the test helpers to avoid holding a lock when a continuation is created. - Switch to using NIOLockedValue box Result: Lower chance of deadlock
Add support for HTTP/1 connection pre-warming (#856) Motivation This patch adds support for HTTP/1 connection pre-warming. This allows the user to request that the HTTP/1 connection pool create and maintain extra connections, above-and-beyond those strictly needed to run the pool. This pool can be used to absorb small spikes in request traffic without increasing latency to account for connection creation. Modifications - Added new configuration properties for pre-warmed connections. - Amended the HTTP/1 state machine to create new connections where necessary. - Added state machine tests. Results Pre-warmed connections are available.
Fix trailing space in ConnectionPool.Key string (#855) Motivation: The trailing space is visible in log message metadata, and depending upon the log handler in use, will sometimes be visible due to quoting. Modifications: Just remove the trailing space. Result: There won't be a trailing space in the key anymore. This has no functional impact whatsoever as far as I was able to determine.
Work around Foundation revert (#813) Motivation Foundation has reverted several of the changes of behaviour in the URL type, leaving 6.0 and 6.1 with a different behaviour on non-Apple platforms than all other versions. We should tolerate that. Modifications Update the tests to understand the difference. Result Tests pass
fix 5.10 compile on Ubuntu 24.04 (Noble) for Intel (x86_64) (#810) Specifically Swift 5.10 _on Intel on Ubuntu Noble (24.04)_ has a crazy bug which leads to compilation failures in a `#if compiler(>=6.0)` block: swiftlang/swift#79285 . This workaround fixes the compilation by _changing the whitespace_. Thanks @gwynne for finding this workaround! --------- Co-authored-by: Johannes Weiss <johannes@jweiss.io>
PreviousNext