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 Sendable warning in NIOPipeBoostrap #2530

Merged
merged 1 commit into from
Oct 3, 2023

Conversation

FranzBusch
Copy link
Member

Motivation

We were accessing self in a @Sendable function in the NIOPipeBoostrap. The 5.10 compiler correctly diagnoses this as a Sendable violation since the bootstrap is in-fact not Sendable.

Modification

Store the channelOptions in a local variable outside of the @Sendable function.

Result

No more Sendable warnings on 5.10

# Motivation
We were accessing `self` in a `@Sendable` function in the `NIOPipeBoostrap`. The 5.10 compiler correctly diagnoses this as a Sendable violation since the bootstrap is in-fact not Sendable.

# Modification
Store the `channelOptions` in a local variable outside of the `@Sendable` function.

# Result
No more Sendable warnings on 5.10
@FranzBusch FranzBusch merged commit 388b85a into main Oct 3, 2023
8 checks passed
@FranzBusch FranzBusch deleted the fb-fix-5.10-sendable-warning branch October 3, 2023 13:22
@FranzBusch FranzBusch added the patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1) label Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-version-bump-only For PRs that when merged will only cause a bump of the patch version, ie. 1.0.x -> 1.0.(x+1)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants