Skip to content

Conversation

@mohamedhafez
Copy link
Contributor

@mohamedhafez mohamedhafez commented Sep 18, 2024

Closes #318

Types of Changes

  • Performance improvement when using nio4r in Ractor, and also for when TruffleRuby can run rb_ext_ractor_safe C-extensions in parallel.

Contribution

  • I tested my changes locally.
    On MacOS 15.0,
    uname -a: Darwin mohameds-mbp.lan 24.0.0 Darwin Kernel Version 24.0.0: Mon Aug 12 20:51:54 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6000 arm64
    Ruby versions: 3.1.6 and 3.3.5
    Results: 112 examples, 0 failures, 2 pending
  • I agree to the Developer's Certificate of Origin 1.1.

STILL REQUIRED:

  • someone with more comfort with C-extensions to review if any global state is used and if the extension really is already fully Ractor-safe
  • Possibly add tests for changes? Might be hard to test for concurrency issues

@mohamedhafez
Copy link
Contributor Author

@ioquatix I'm guessing the failing Mac tests just weren't set up to run correctly? Running the test suite on my MacOS 15.0 with both ruby 3.1.6 and 3.3.5, tests seem to pass without issue

@ioquatix
Copy link
Member

Yes, the CI will need to be updated, do you want to have a go at making a separate PR to update CI? We can rebase this PR on top of it.

Copy link
Member

@ioquatix ioquatix left a comment

Choose a reason for hiding this comment

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

AFAIK this gem does not have any thread unsafe state. However, I'll review it before making the next release.

@ioquatix ioquatix merged commit 97604ca into socketry:main Sep 28, 2024
@ioquatix
Copy link
Member

Thanks for your contribution.

@ioquatix ioquatix added this to the v2.7.4 milestone Oct 28, 2024
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.

Make C-extension Ractor-safe

2 participants