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

unchecked Sendable for the Channels #3050

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

Lukasa
Copy link
Contributor

@Lukasa Lukasa commented Jan 13, 2025

Motivation:

All of NIO's channels are thread-safe, and that includes the NIOPosix ones. In an ideal world we'd have written these in such a way that they rely on very small, easily-verified types to enforce this constraint. We will migrate towards that in time, but for expediency we can mark these as they are, which is @unchecked Sendable.

Modifications:

Mark the core NIOPosix channel types @unchecked Sendable.

Result:

Fewer warnings.

@Lukasa Lukasa added the 🔨 semver/patch No public API change. label Jan 13, 2025
@Lukasa Lukasa force-pushed the cb-unchecked-sendable-channels branch from cba0939 to 9539033 Compare January 13, 2025 10:38
@Lukasa Lukasa merged commit 23d0b08 into apple:main Jan 13, 2025
34 of 35 checks passed
@Lukasa Lukasa deleted the cb-unchecked-sendable-channels branch January 13, 2025 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants