Skip to content
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

Make AsyncPredicate Sendable, constrain it to Sendable types #1072

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

younata
Copy link
Member

@younata younata commented Jul 30, 2023

As part of concurrency checking, AsyncPredicate needs to be Sendable. Part of that is that the closure needs to be Sendable and AsyncPredicate needs to be constrained to only Sendable types.

As part of interop with AsyncPredicate, Predicate needs to be Sendable. Though, it's ok to only make Predicate Sendable when the type it works with is Sendable (that is, we have: extension Predicate: Sendable where T: Sendable {}).

This also fixes compiler errors in Nimble associated with making the closures passed to Predicate Sendable.

Make Predicate's closure Sendable, and make Predicate Sendable when the returning value is Sendable
@younata younata added this to the v13.0.0 milestone Jul 30, 2023
@younata younata merged commit 89f5479 into nimble-13 Aug 13, 2023
5 checks passed
@younata younata deleted the sendable-asyncpredicate branch August 13, 2023 03:56
@younata younata mentioned this pull request Aug 13, 2023
1 task
younata added a commit that referenced this pull request Mar 17, 2024
Make Predicate's closure Sendable, and make Predicate Sendable when the returning value is Sendable
younata added a commit that referenced this pull request Apr 11, 2024
Make Predicate's closure Sendable, and make Predicate Sendable when the returning value is Sendable
younata added a commit that referenced this pull request Jun 18, 2024
Make Predicate's closure Sendable, and make Predicate Sendable when the returning value is Sendable
younata added a commit that referenced this pull request Oct 14, 2024
Make Predicate's closure Sendable, and make Predicate Sendable when the returning value is Sendable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant