Skip to content

ref: Save main thread Id during SentryCrashDefaultMachineContextWrapper +load#1928

Merged
brustolin merged 1 commit into
masterfrom
fiz/load-SentryCrashDefaultMachineContextWrapper
Jul 1, 2022
Merged

ref: Save main thread Id during SentryCrashDefaultMachineContextWrapper +load#1928
brustolin merged 1 commit into
masterfrom
fiz/load-SentryCrashDefaultMachineContextWrapper

Conversation

@brustolin

Copy link
Copy Markdown
Contributor

We were using +initialize method from SentryCrashDefaultMachineContextWrapper to save the main thread id. +initialize is called with the first message sent to the class, and this can occur in any thread.

'+load' is called when the library is load and this always occurs on the main thread, therefore a much safer place to save main thread id.

#skip-changelog

@brustolin
brustolin requested a review from philipphofmann as a code owner July 1, 2022 09:16
@philipphofmann philipphofmann changed the title fix: Save main thread Id during SentryCrashDefaultMachineContextWrapper +load ref: Save main thread Id during SentryCrashDefaultMachineContextWrapper +load Jul 1, 2022

@philipphofmann philipphofmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@brustolin
brustolin merged commit 673aaa4 into master Jul 1, 2022
@brustolin
brustolin deleted the fiz/load-SentryCrashDefaultMachineContextWrapper branch July 1, 2022 10:00
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