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

Fix some strict concurrency warnings #310

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

FranzBusch
Copy link
Member

Motivation

There were a few new strict concurrency warnings that this PR fixes.

# Motivation

There were a few new strict concurrency warnings that this PR fixes.
@FranzBusch FranzBusch requested a review from phausler April 4, 2024 13:47
@FranzBusch
Copy link
Member Author

@swift-ci please test

Copy link
Member

@phausler phausler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I presume if there is then later a transfer keyword we will likely migrate to that eh?

@FranzBusch
Copy link
Member Author

I presume if there is then later a transfer keyword we will likely migrate to that eh?

Sadly we can't since the elements are returned from an iterator. The next method is not marked as transferring the return element so we can't forward transfer it. However, what we are doing here is safe since the elements are never owned by more than one task.

@FranzBusch FranzBusch merged commit 46b4464 into apple:main Apr 4, 2024
2 checks passed
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.

2 participants