-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix sendability warnings in URLSessionHTTPClient
#7441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Achieved by converting `DownloadTask` and `DataTask` to value types and adding more `Sendable` annotations where needed.
@swift-ci test |
@swift-ci test |
@swift-ci test |
@@ -12,8 +12,6 @@ | |||
|
|||
import Basics | |||
|
|||
import Build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated warning, but probably not worth a separate one-liner PR, so chucking that in here instead.
@swift-ci test windows |
@@ -312,7 +312,7 @@ extension LegacyHTTPClient { | |||
headers: HTTPClientHeaders = .init(), | |||
options: Request.Options = .init(), | |||
observabilityScope: ObservabilityScope? = .none, | |||
completion: @escaping (Result<Response, Error>) -> Void | |||
completion: @Sendable @escaping (Result<Response, Error>) -> Void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stylistic nit: I think the preferred ordering for function types is @escaping @Sendable
Achieved by converting `DownloadTask` and `DataTask` to value types and adding more `Sendable` annotations where needed.
Achieved by converting `DownloadTask` and `DataTask` to value types and adding more `Sendable` annotations where needed.
Achieved by converting `DownloadTask` and `DataTask` to value types and adding more `Sendable` annotations where needed. (cherry picked from commit 549d781)
Converted
DownloadTask
andDataTask
to value types and added moreSendable
annotations where needed.