-
Notifications
You must be signed in to change notification settings - Fork 11
Mark Sendable for NetworkContext's external async calls #36
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,7 +32,7 @@ internal import Synchronization | |
| #endif | ||
|
|
||
| @available(Network 0.1.0, *) | ||
| final class EndpointFlow: CustomDebugStringConvertible { | ||
| final class EndpointFlow: CustomDebugStringConvertible, @unchecked Sendable { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In NIO we have a rule that any use of Using |
||
|
|
||
| /// State used to emit logs on the data path. | ||
| public var log = NetworkLoggerState() | ||
|
|
@@ -269,7 +269,7 @@ final class EndpointFlow: CustomDebugStringConvertible { | |
| } | ||
| } | ||
|
|
||
| func async(_ block: @escaping () -> Void) { | ||
| func async(_ block: @Sendable @escaping () -> Void) { | ||
| self.parameters.context.async(block) | ||
| } | ||
|
|
||
|
|
||
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.
Are we able to build the WriteRequest and then pass it into the block to avoid the
nonisolated(unsafe)?