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

refactor: make SourceView implement Sync #80

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

underfin
Copy link
Contributor

@underfin underfin commented Mar 8, 2024

Close #79

Comment on lines 143 to 144
processed_until: Arc<Mutex<usize>>,
lines: Arc<Mutex<Vec<(*const u8, usize)>>>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think we need any Arc here at all, a Mutex should suffice.
The first one can also be a AtomicUsize instead. I’m unsure why the previous code was using a RefCell instead of just a Cell.

@Swatinem
Copy link
Member

Swatinem commented Mar 8, 2024

While this is a change definitely worth having, long term, I would rather get rid of SourceView completely.
I don’t think its fully written down in #71, but definitely something we should work towards.

@underfin
Copy link
Contributor Author

underfin commented Mar 8, 2024

@Swatinem Thanks for your review, i already update code. If you merged this, could you publish a new version for this? Thank you for your work.

@Swatinem Swatinem merged commit 43ca60a into getsentry:master Mar 11, 2024
4 checks passed
@underfin
Copy link
Contributor Author

@Swatinem Could you publish a new version for this? Thanks.

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

Successfully merging this pull request may close these issues.

[Feat Request]Make SourceMap struct is Sync.
2 participants