Skip to content

Avoid extra MainActor hop from Shared[Reader].load(_:)#154

Merged
stephencelis merged 1 commit intopointfreeco:mainfrom
pyrtsa:no-mainactor-hop-on-shared-load
May 7, 2025
Merged

Avoid extra MainActor hop from Shared[Reader].load(_:)#154
stephencelis merged 1 commit intopointfreeco:mainfrom
pyrtsa:no-mainactor-hop-on-shared-load

Conversation

@pyrtsa
Copy link
Contributor

@pyrtsa pyrtsa commented May 5, 2025

A drive-by observation while reading code, it doesn't seem necessary to hop to MainActor in the body of Shared[Reader].load(_:).

Copy link
Member

@stephencelis stephencelis left a comment

Choose a reason for hiding this comment

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

Thanks! I think this was here to solve an issue with SwiftUI observation, originally, but I think we have a more holistic solution employed these days, and so this looks good to us!

@stephencelis stephencelis merged commit 2298167 into pointfreeco:main May 7, 2025
6 checks passed
mhayes853 pushed a commit to mhayes853/swift-sharing that referenced this pull request Aug 12, 2025
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