Conversation
This is part of the larget aim to make `Parameters` `Sendable`. `Parameters` can only be `Sendable` once everything its protocol stack holds is, starting with the per-protocol options. Most of the value-typed options only lacked the declaration. `CustomLinkOptions` and `BridgeOptions` store handlers that the stack calls from its own context, so those handlers are now `@Sendable`, as are the copies `CustomLinkInstance` keeps. `SwiftTLSOptions` is not yet `Sendable`, so `SwiftTLS` is imported with `@preconcurrency` until swift-tls declares the conformance, which leaves one warning until then. Requiring `@Sendable` handlers is a source break for callers that pass non-`Sendable` closures to the `CustomLink` or `BridgeDatagramProtocol` handlers; the three tests that did are updated. `QUICTransfer`, `QUICHandshake`, and `QUICStreamLoad`, built with logging compiled out, show every difference within 1%.
…FTTLS` Under `EXPORT_SWIFTTLS` the options store a `SwiftTLSOptions`, which is not `Sendable`. Importing `SwiftTLS` with `@preconcurrency` only downgraded the resulting diagnostic to a warning, and CI builds with `-warnings-as-errors`, so every build failed. * Moved the `Sendable` conformance into an extension that only exists without `EXPORT_SWIFTTLS` * Dropped the `@preconcurrency` on the `SwiftTLS` imports Under `EXPORT_SWIFTTLS` the options are not `Sendable` until swift-tls declares the conformance for `SwiftTLSOptions`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is part of the larget aim to make
ParametersSendable.Parameterscan only beSendableonce everything its protocol stack holds is, starting with the per-protocol options. Most of the value-typed options only lacked the declaration.CustomLinkOptionsandBridgeOptionsstore handlers that the stack calls from its own context, so those handlers are now@Sendable, as are the copiesCustomLinkInstancekeeps.SwiftTLSOptionsis not yetSendable, soSwiftTLSis imported with@preconcurrencyuntil swift-tls declares the conformance, which leaves one warning until then.Requiring
@Sendablehandlers is a source break for callers that pass non-Sendableclosures to theCustomLinkorBridgeDatagramProtocolhandlers; the three tests that did are updated.QUICTransfer,QUICHandshake, andQUICStreamLoad, built with logging compiled out, show every difference within 1%.