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

Improve Bugsnag.start thread-safety #1638

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

lemnik
Copy link
Contributor

@lemnik lemnik commented Mar 23, 2022

Goal

Allow Bugsnag functions (notify, leaveBreadcrumb, addMetadata, etc.) to be safely invoked from background threads, while Bugsnag.start is still running.

The additional lock makes late & multi-threaded startup safe.

Testing

Added an end-to-end test that flakes (typically failing) when the additional lock is not in place.

@lemnik lemnik requested a review from kattrali March 23, 2022 18:48
@lemnik lemnik force-pushed the PLAT-4420/bugsnag-start-thread-safety branch from 0fc3558 to a6dca4e Compare March 23, 2022 18:48
… functions are safe to call while `Bugsnag.start` is still running
@lemnik lemnik force-pushed the PLAT-4420/bugsnag-start-thread-safety branch from a6dca4e to 22fc60e Compare March 24, 2022 09:09
@lemnik lemnik merged commit d6d3b48 into next Mar 24, 2022
@lemnik lemnik deleted the PLAT-4420/bugsnag-start-thread-safety branch March 24, 2022 16:46
@lemnik lemnik mentioned this pull request Mar 31, 2022
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.

2 participants