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

WIP: Make NIOFileDescriptor/FileRegion/IOData Sendable #2598

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

weissi
Copy link
Member

@weissi weissi commented Nov 25, 2023

  • this is currently slow, ugly and overly complex
  • there's much potential for optimisation

Ideally, we'd duplicate NIOFileHandle so we have two versions

  1. roughly the one implemented in this PR which is Sendable
  2. a second, internal one just for the selectors/base channels, not Sendable, no atomics (exactly like the old one)

But I'm not sure that works. This PR is here to derisk having to keep one NIOFileHandle for both.

@FranzBusch
Copy link
Contributor

Thanks for opening the discussion here. So far we have stayed away from making those changes and debated if we should just drop the whole IOData support in a potential NIO 3. Though we haven't come to any agreement on that matter yet. This would definitely solve the immediate pain of the Sendable problem that we are facing now.

@FranzBusch
Copy link
Contributor

After having looked at the strict checking this is one of the last remaining issues in NIOCore. The PR itself looks good and IMO we should move forward with this.

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.

None yet

2 participants