Skip to content

Add io_pread and io_pwrite methods to IO_Event_Selector_KQueue#162

Open
ItaloCobains wants to merge 3 commits intosocketry:mainfrom
ItaloCobains:io-pread-io-pwrite
Open

Add io_pread and io_pwrite methods to IO_Event_Selector_KQueue#162
ItaloCobains wants to merge 3 commits intosocketry:mainfrom
ItaloCobains:io-pread-io-pwrite

Conversation

@ItaloCobains
Copy link
Copy Markdown

Types of Changes

  • New feature.

Contribution

@ioquatix ioquatix requested a review from Copilot March 27, 2026 09:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds positional IO buffer operations (io_pread/io_pwrite) to the IO::Event::Selector::KQueue backend, aligning KQueue with other selectors that support IO::Buffer-based scheduler hooks.

Changes:

  • Implement IO_Event_Selector_KQueue_io_pread using pread(2) with scheduler-aware retry via io_wait.
  • Implement IO_Event_Selector_KQueue_io_pwrite using pwrite(2) with scheduler-aware retry via io_wait.
  • Expose both methods to Ruby via rb_define_method when HAVE_RUBY_IO_BUFFER_H is available.

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