Skip to content

Conversation

@mohamedhafez
Copy link
Contributor

@mohamedhafez mohamedhafez commented Sep 13, 2024

Description

Please describe your pull request. Thank you for contributing! You're the best.

Your checklist for this pull request

  • I have reviewed the guidelines for contributing to this repository.
  • I have added (or updated) appropriate tests if this PR fixes a bug or adds a feature.
  • My pull request is 100 lines added/removed or less so that it can be easily reviewed.
  • If this PR doesn't need tests (docs change), I added [ci skip] to the title of the PR.
  • If this closes any issues, I have added "Closes #issue" to the PR description or my commit messages.
  • I have updated the documentation accordingly.
  • All new and existing tests passed, including Rubocop. (Its such a small change I just let CI run the tests)

Closes #3422

Copy link
Contributor

@schneems schneems left a comment

Choose a reason for hiding this comment

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

The code has already been looked at by @eregon and given a greenlight to mark as Ractor safe. This code is basically identical to code in ruby/ruby https://github.com/ruby/ruby/blob/80e483afac93cf148080c9f7409aaa4fe5e32d9a/ext/monitor/monitor.c#L206-L208

From https://github.com/ruby/ruby/blob/80e483afac93cf148080c9f7409aaa4fe5e32d9a/doc/extension.rdoc#L2217

If an extension desires to be marked as Ractor-safe the extension should call rb_ext_ractor_safe(true) at the Init_ function for the extension, and all defined methods will be marked as Ractor-safe.

That all looks good. Will merge in.

@schneems schneems merged commit c220256 into puma:master Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Marking C-extension as Ractor-safe

3 participants