8000 esp32/network_ppp: Reduce PPP thread CPU usage. by DvdGiessen · Pull Request #12728 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

esp32/network_ppp: Reduce PPP thread CPU usage. #12728

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

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

DvdGiessen
Copy link
Contributor

Reduces the CPU usage by the PPP thread by sleeping for one tick if there was nothing to read; preventing the loop using 100% CPU when the read operation has a zero timeout and immediately returns.

@dpgeorge
Copy link
Member

Thanks, this looks like a reasonable thing to do.

Reduces the CPU usage by the PPP thread by sleeping for one tick if
there was nothing to read; preventing the loop using 100% CPU when the
read operation has a zero timeout and immediately returns.

Signed-off-by: Daniël van de Giessen <daniel@dvdgiessen.nl>
@dpgeorge dpgeorge force-pushed the esp32_ppp_sleepwhenempty branch from f0a274e to a1d20e0 Compare October 31, 2023 01:11
@dpgeorge dpgeorge merged commit a1d20e0 into micropython:master Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0