-
-
Notifications
You must be signed in to change notification settings - Fork 941
Implement Ractor #9029
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
base: master
Are you sure you want to change the base?
Implement Ractor #9029
Conversation
* Basic construction and usage are there. * Port is there but it's just Queue (no shareability detection). * Some types aren't covered by make_shareable. * The given proc is checked for sanity.
Because so many libraries change behavior upon detecting the "Ractor" constant, a partial implementation prevents most of them from booting properly. This moves the definition of Ractor into an extension library, so it can be left undefined for applications that will not use Ractors.
|
I've made a tweak here to move the definition of Ractor into an extension library ( The current implementation is partial, but because so many libraries use the presence of the I will be proposing to ruby-core that Ractor be gated behind a require there as well. |
|
Recent change adds There's also an alternative implementation in pure Ruby on top of Thread and Queue here that could be shipped as our implementation of Ractor. Since the work here has primarily been to get |
* Use an enum for features and their enablers and aliases. * Avoid confusing "disabled" booleans by using "enabled" booleans. * Deprecate old accessors. * Add missing accessors for error_highlight feature.
Right, that's https://github.com/eregon/ractor-shim and it implements all methods of the Ruby 3.5 Ractor API. |
Initial push is very preliminary, but can run the simple script shown below.
Script: