fix: Workaround Non-Threadsafe Use of Rc in bam::record::Record#345
Draft
jch-13 wants to merge 2 commits intorust-bio:masterfrom
Draft
fix: Workaround Non-Threadsafe Use of Rc in bam::record::Record#345jch-13 wants to merge 2 commits intorust-bio:masterfrom
Rc in bam::record::Record#345jch-13 wants to merge 2 commits intorust-bio:masterfrom
Conversation
Pull Request Test Coverage Report for Build 1789725128
💛 - Coveralls |
Rc in bam::record::RecordRc in bam::record::Record
Rc in bam::record::RecordRc in bam::record::Record
Contributor
|
The use case was to make it convenient to conduct header-requiring operations without having the reader at hand (e.g. in a larger codebase, where passing on the reader would make things unnecessarily complicated). @jch-13, you thing Arc would be an alternative? |
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.
Hey all, this is an attempt to work around #293 (for context please see the discussion there).
I simply removed the reference counted reference to
HeaderViewfrom BAMRecords and impl'edgenome::AbstractIntervalon a wrapper type around&Recordand&HeaderView. This wrapper type can be constructed like this:This is not exactly elegant and I don't know the use cases that made references to headers necessary in the first place, so please let me know if this workaround is viable at all.
Edit: I've removed
Rcwrappers aroundHeaderViews as well since I doubt they were actually needed.unsafeSendimpls forReaderandWriterhad to be removed too because they were unsound.I hope this does not break a lot of code and I'm not missing anything obvious here... :)