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

Ractor compat #62

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

HoneyryderChuck
Copy link

The PR refactores ClassHash approach to be ractor-safe while keeping backwards compatibility. It also freezes the content of default_config_hash, which should not be mutable anyway (and this also makes it shareable across ractors).

@reesericci
Copy link

Oh, this is beautiful and likely negates the needs for the immutable DNS primitives I was working on, thanks!

lib/resolv.rb Outdated Show resolved Hide resolved
mutable constants can't be shared across ractors; this changes that design to define the required variables as constants on the Resource class, which makes them reachable using ractors; the ClassHash is kept in order not to break integrations relying on its existence, but under the hood it's doing the same thing
@HoneyryderChuck
Copy link
Author

@nobu anything else worth addressing?

@HoneyryderChuck
Copy link
Author

@akr can I ask for a review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants