Add reference queue support to WeakRef.#408
Closed
headius wants to merge 1 commit intoruby:masterfrom
Closed
Conversation
Contributor
headius
commented
Oct 1, 2013
- lib/weakref.rb: Add support for a reference queue. See Let --yjit-dump-disasm=all dump ocb code as well #6309.
- test/test_weakref.rb: Test reference queue logic.
* test/test_weakref.rb: Test reference queue logic.
Contributor
Author
|
Note that the test does not pass, and I'm not sure why. |
Member
Member
|
It seems to have a conflict now. Could you rebase this against master? |
Member
|
Not sure why #480 was closed, but as it has not been updated for a while, let me close this. Please reopen this after resolving conflicts. Thanks. |
Contributor
Author
|
I'm not sure if this PR is still relevant with work that has been done since then on WeakRef. In any case it would be much more efficient if the reference queue support were handled in native code by the GC, whenever a WeakRef is vacated. I have talked with @tenderlove in the past about this feature. I'd be happy to help implement this properly but I am not familiar with the native parts of WeakRef (mostly ObjectSpace::Weakmap). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.