Skip to content

Fix panic when IO error for some cpu features#558

Open
Camerooooon wants to merge 5 commits intoJakeRoggenbuck:mainfrom
Camerooooon:fix-io-panic
Open

Fix panic when IO error for some cpu features#558
Camerooooon wants to merge 5 commits intoJakeRoggenbuck:mainfrom
Camerooooon:fix-io-panic

Conversation

@Camerooooon
Copy link
Copy Markdown
Collaborator

list_cpus() could throw an error if there is an IO error when fetching non-essential information about the CPU. This PR tries to handle those errors and work around them whenever possible so auto clock speed isn't rendered useless.

  • Modify list_cpus() to return a result and adjust the functions which depend on them to return result.
  • Add updated error handling for use of list_cpus()

Copy link
Copy Markdown
Owner

@JakeRoggenbuck JakeRoggenbuck left a comment

Choose a reason for hiding this comment

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

Looks good! Merge whenever ready

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.

Thread panic sometimes when attempting to fetch CPU info on Thinkpad X1 Nano Gen 1

2 participants