fix: Workaround Non-Threadsafe Use of Rc
in bam::record::Record
#345
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
HeaderView
from BAMRecord
s and impl'edgenome::AbstractInterval
on a wrapper type around&Record
and&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
Rc
wrappers aroundHeaderView
s as well since I doubt they were actually needed.unsafe
Send
impls forReader
andWriter
had 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... :)