-
Notifications
You must be signed in to change notification settings - Fork 14
Marked objects as Sendable or explicitly not Sendable #8
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
Changes from 2 commits
d6ba1ea
556f9cc
b69d806
3ff7021
263175b
d504702
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 |
---|---|---|
|
@@ -49,7 +49,7 @@ struct AsyncSequenceOfOne<Element: Sendable, Failure: Error>: AsyncSequence, Sen | |
} | ||
|
||
@usableFromInline | ||
struct AsyncIterator: AsyncIteratorProtocol { | ||
struct AsyncIterator: AsyncIteratorProtocol, Sendable { | ||
|
||
@usableFromInline | ||
private(set) var result: Result<Element, Failure>? | ||
|
||
|
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.
We can't unconditionally add this flag here; these flags are always enabled. This one should only be added for development.
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.
Forgot to remove it! Thanks for the reminder.
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.
We can still have it so we can enable it during development though - here's an example: https://github.com/apple/swift-nio-ssl/blob/main/Package.swift#L59-L73
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.
Okay, let me add this then.
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.
I don't think we need to add it back behind a flag. It was helpful when we were doing lots of strict concurrency work, but we're very unlikely to flip that flag back on now that the work has been done.