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

Add Sendable Conformance to Field and Reference Types #353

Merged
merged 3 commits into from
Dec 1, 2024

Conversation

vamsii777
Copy link
Contributor

Description

Added Sendable conformance to Field and Reference types for improved thread safety and compatibility with concurrent Swift contexts:

Motivation and Context

This change ensures compatibility with Sendable requirements in Swift's concurrency model, addressing thread-safety concerns for asynchronous use cases. No breaking changes are introduced.

How Has This Been Tested?

  • Manual testing of affected structures in a concurrent environment to ensure proper Sendable behavior.
  • Reviewed usage of Field and Reference types to confirm no adverse impact on existing functionality.

Checklist:

  • If applicable, I have updated the documentation accordingly.
  • If applicable, I have added tests to cover my changes.

Makes the Field<C> property wrapper Sendable-compliant to better support concurrent operations and Swift's actor isolation system.
- Remove direct Sendable conformance from Field struct
- Add conditional Sendable conformance via extension where C: Sendable
@vamsii777 vamsii777 requested a review from Joannis as a code owner December 1, 2024 20:47
@Joannis Joannis merged commit 6654e80 into orlandos-nl:main Dec 1, 2024
@Joannis
Copy link
Member

Joannis commented Dec 1, 2024

Thanks for the PR!

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