Skip to content

Resolve concurrency check warning on Swift 5.10#522

Merged
MattKiazyk merged 1 commit intoXcodesOrg:mainfrom
LiYanan2004:swift-5.10
May 25, 2024
Merged

Resolve concurrency check warning on Swift 5.10#522
MattKiazyk merged 1 commit intoXcodesOrg:mainfrom
LiYanan2004:swift-5.10

Conversation

@LiYanan2004
Copy link
Contributor

Swift 5.10 introduces stricter concurrency check which adds one more warning Reference to captured var 'progress' in concurrently-executing code; this is an error in Swift 6.

Because progress update is based on Notification and operates on OperationQueue.main, so we don't need to worry about data races.

So I opt-out concurrency check here by using nonisolated(unsafe)

@MattKiazyk
Copy link
Contributor

@LiYanan2004 can you clean up this PR so it just includes the concurrency check since the other change was already merged in via #521

@LiYanan2004
Copy link
Contributor Author

@MattKiazyk Hi, thanks for mentioning this. It's my fault. I have cleaned the PR to only contains swift-5.10 concurrency fix.

@MattKiazyk MattKiazyk added the chore Repo/Project upkeep label May 25, 2024
@MattKiazyk MattKiazyk merged commit 4a4b469 into XcodesOrg:main May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Repo/Project upkeep

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants