You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_fork is meant to be patched, so code that needs a performant notification at fork time can make the necessary changes at that time, without having to poll.
Ruby 3.0 is EOL (and 3.1 will be soon), so every supported Ruby should have this method.
Is it worthwhile to try patching _fork and making use of that?
The text was updated successfully, but these errors were encountered:
Good point. mini_racer only supports non-EOL'd Rubies, so like you said, we should be good on that front.
I'm not 100% sure how reliable an "automatic" solution could be, but it's definitely worth updating the README section.
That being said, for our use case, where we are forking and using mini_racer, MiniRacer::Platform.set_flags!(:single_threaded) has proven to be quite reliable.
Hi, I just noticed this note in the README from 2019 (Ruby 2.6):
https://github.com/rubyjs/mini_racer?tab=readme-ov-file#fork-safety
In 2021, Ruby 3.1 was released with the addition of
Process._fork
:https://bugs.ruby-lang.org/issues/17795
_fork
is meant to be patched, so code that needs a performant notification at fork time can make the necessary changes at that time, without having to poll.Ruby 3.0 is EOL (and 3.1 will be soon), so every supported Ruby should have this method.
Is it worthwhile to try patching
_fork
and making use of that?The text was updated successfully, but these errors were encountered: