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

Make C-extension Ractor-safe #318

Closed
mohamedhafez opened this issue Jul 5, 2024 · 4 comments · Fixed by #320
Closed

Make C-extension Ractor-safe #318

mohamedhafez opened this issue Jul 5, 2024 · 4 comments · Fixed by #320

Comments

@mohamedhafez
Copy link
Contributor

mohamedhafez commented Jul 5, 2024

In planning ahead to the near future when TruffleRuby can run C-extensions marked with rb_ext_ractor_safe(true) in parallel, and for when Ractors are no longer just experimental, it would be great if the C-extension could be made Ractor-safe, or marked as such if it already is so!

@ioquatix
Copy link
Member

ioquatix commented Jul 5, 2024

That seems reasonable, do you want to have a go at making a PR?

@mohamedhafez
Copy link
Contributor Author

mohamedhafez commented Jul 5, 2024

Unfortunately I don't know the first thing about programming in C personally 😅 And to be honest I just don't have the bandwith to figure it out

@mohamedhafez mohamedhafez changed the title Make C-extension threadsafe/Ractor-safe Make C-extension Ractor-safe Jul 6, 2024
@mohamedhafez
Copy link
Contributor Author

mohamedhafez commented Sep 18, 2024

@ioquatix I actually got a PR merged into trilogy, and have one pending for puma after having a maintainer comment on an issue that it would be welcome and shouldn't cause issues. I would be happy to send one in here if you or another maintainer could take a quick look and make sure there isn't any global state being used, and that things should already be Ractor-safe (unfortunately I don't have the background in C-extensions to really be able to do that myself). If you give me the all-clear, I'd love to send in a similar PR here!

@ioquatix
Copy link
Member

Sure, I'd be totally happy with that and can help merge and release it.

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 a pull request may close this issue.

2 participants