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

ref: Switch Hubs using a Guard #524

Merged
merged 2 commits into from Nov 28, 2022
Merged

ref: Switch Hubs using a Guard #524

merged 2 commits into from Nov 28, 2022

Conversation

Swatinem
Copy link
Member

@Swatinem Swatinem commented Nov 24, 2022

Use a SwitchGuard internally as a replacement for Hub::run which does
not require passing a closure, and does not go through panic::catch_unwind,
as Drop impls are guaranteed to be executed even when panics are unwinding.

fixes #522

@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2022

Codecov Report

Merging #524 (88a30a7) into master (00da3fc) will decrease coverage by 0.07%.
The diff coverage is 78.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #524      +/-   ##
==========================================
- Coverage   78.78%   78.70%   -0.08%     
==========================================
  Files          76       77       +1     
  Lines        9266     9279      +13     
==========================================
+ Hits         7300     7303       +3     
- Misses       1966     1976      +10     

Use a SwitchGuard internally as a replacement for `Hub::run` which does
not require passing a closure, and does not go through `panic::catch_unwind`,
as `Drop` impls are guaranteed to be executed even when panics are unwinding.
@Swatinem Swatinem marked this pull request as ready for review November 28, 2022 11:24
@Swatinem Swatinem merged commit b5a7d8e into master Nov 28, 2022
@Swatinem Swatinem deleted the ref/hub-guard branch November 28, 2022 14:06
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.

Improve Hub::run/SentryFuture abstraction using scope guard
3 participants