Skip to content

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
@underfin
Copy link
Contributor Author

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

wbinnssmith added a commit to vercel/next.js that referenced this pull request Oct 16, 2024
Previously, the sourcemap crate did not implement Send+Sync on `DecodedMap`, so we created unsafe wrappers around it and avoided unsafe behavior. Since getsentry/rust-sourcemap#80, this is no longer necessary.

Test Plan: CI
wbinnssmith added a commit to vercel/next.js that referenced this pull request Oct 16, 2024
Previously, the sourcemap crate did not implement Send+Sync on `DecodedMap`, so we created unsafe wrappers around it and avoided unsafe behavior. Since getsentry/rust-sourcemap#80, this is no longer necessary.

Test Plan: CI
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